Hi. Opening per suggestion in Bug 23200.
The following program: --- int main() { const int i = 1; asm volatile ("" :: "i"(i)); return i; } --- gives this when compiled without -Ox: --- asc.c: In function 'main': asc.c:4: warning: asm operand 0 probably doesn't match constraints asc.c:4: error: impossible constraint in 'asm' --- Turning on the optimization makes it to compile. -- Summary: rejects "i"(const_var) without -O1 Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: inline-asm AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: stsp at users dot sourceforge dot net GCC host triplet: x86_64, i386 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34830