File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1787,7 +1787,12 @@ bool Compiler<Emitter>::VisitArraySubscriptExpr(const ArraySubscriptExpr *E) {
1787
1787
return false ;
1788
1788
if (DiscardResult)
1789
1789
return this ->emitPopPtr (E);
1790
- return true ;
1790
+
1791
+ if (E->isGLValue ())
1792
+ return true ;
1793
+
1794
+ OptPrimType T = classifyPrim (E);
1795
+ return this ->emitLoadPop (*T, E);
1791
1796
}
1792
1797
1793
1798
template <class Emitter >
Original file line number Diff line number Diff line change @@ -368,3 +368,7 @@ void discardedCmp(void)
368
368
{
369
369
(* _b ) = ((& a == & a ) , a ); // all-warning {{left operand of comma operator has no effect}}
370
370
}
371
+
372
+ /// ArraySubscriptExpr that's not an lvalue
373
+ typedef unsigned char U __attribute__((vector_size (1 )));
374
+ void nonLValueASE (U f ) { f [0 ] = f [((U )(U ){0 })[0 ]]; }
You can’t perform that action at this time.
0 commit comments