Hi. Opening per suggestion in Bug 23200. The following program: --- int main() { static const int i = 1; asm volatile ("" :: "i"(i)); return i; } --- gives this when compiled without -O2: --- asc1.c: In function 'main': asc1.c:4: warning: asm operand 0 probably doesn't match constraints asc1.c:4: error: impossible constraint in 'asm' --- Using -O2 makes it to compile.
Created attachment 14961 [details] test case
static const int i = 1; i is not a constant integal expression in C. It is in C++. With optimization, we "inline" the value.