------- Comment #5 from daney at gcc dot gnu dot org 2009-01-09 22:00 -------
You have to be able to do one of the original test case or this:
$ cat foo1.c
void baz(int v)
{
unsigned a;
a = (v == 1) ? 1 : 2;
if (__builtin_constant_p(a)) {
asm volatile ("you lose. %0" : : "i" (a));
} else {
asm volatile ("you win. %0" : : "i" (a));
}
}
$ gcc -O2 -S foo1.c
foo1.c: In function baz:
foo1.c:9: warning: asm operand 0 probably doesnt match constraints
foo1.c:9: error: impossible constraint in asm
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38789