While compiling kernel modules of 2.6.18 I hit this error. The testcase in question is attached. This file works all fine with gcc 4.1.2 prerelease. but GCC 4.2.0 prerelease throws the following error message. test1.c: In function 'unknown_bootoption': test1.c:15186: warning: asm operand 2 probably doesn't match constraints test1.c:15186: error: impossible constraint in 'asm' To reproduce this compile the attached preprocessed file with -O2 -c compile time options. This work ok when -O2 is not used.
Created attachment 12499 [details] preprocessed testcase
do { __asm__ __volatile__( "1: twi 31,0,0\n" ".section __bug_table,\"a\"\n" "\t"".long" " "" 1b,%0,%1,%2\n" ".previous" : : "i" (241), "i" ("init/main.c"), "i" ((__func__))); } while (0);
This is not really a bug, since using "i" is not the correct constraint anyways. *** This bug has been marked as a duplicate of 27528 ***