REPOSITORY
rL LLVM
================
Comment at: cfe/trunk/lib/Sema/SemaStmtAsm.cpp:158
@@ +157,3 @@
+ // Bitfield can't be referenced with a pointer.
+ if (Info.allowsMemory() && OutputExpr->refersToBitField())
+ return StmtError(Diag(OutputExpr->getLocStart(),
----------------
What about other weird kinds of lvalues, like the result of `__real` /
`__imag`, vector indexing, and global register variables? Those have the same
problem; CGStmt.cpp blindly calls `LValue::getAddress` without checking for
those cases.
Testcase:
typedef __attribute__((vector_size(16))) int vi4;
void test(vi4 v) {
__asm__("" : "=rm"(v[2]));
}
http://reviews.llvm.org/D10086
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits