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) {
17871787 return false ;
17881788 if (DiscardResult)
17891789 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);
17911796}
17921797
17931798template <class Emitter >
Original file line number Diff line number Diff line change @@ -368,3 +368,7 @@ void discardedCmp(void)
368368{
369369 (* _b ) = ((& a == & a ) , a ); // all-warning {{left operand of comma operator has no effect}}
370370}
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