[PATCH] D10476: Additional fix for PR14269: Clang crashes when a bit field is used as inline assembler input / output with memory constraint
Eric Christopher
echristo at gmail.com
Tue Jul 7 11:33:36 PDT 2015
This seems to be a bit overconstrained versus what gcc accepts on the testcase:
dzur:~/tmp> gcc -S baz.c |
baz.c: In function ‘test16’: |
baz.c:18:4: error: cannot take address of bit-field ‘field3’ |
: "m" (a.field3)); // expected-error {{reference to a non-addressable value in asm input with a me\|
m |
^ |
baz.c:28:4: error: address of global register variable ‘test16_baz’ requested |
: "m" (test16_baz)); // expected-error {{reference to a non-addressable value in asm input with a \|
m |
^ |
baz.c:16:3: error: memory input 0 is not directly addressable |
__asm__("movl $5, %0" |
^ |
baz.c:26:3: error: memory input 0 is not directly addressable |
__asm__("movl $5, %0" |
^ |
also, the precision in error messages is nice. :)
-eric
http://reviews.llvm.org/D10476
More information about the cfe-commits
mailing list