------- Comment #4 from segher at kernel dot crashing dot org 2006-11-12 14:01 ------- > If the code is invalid, the fact that it compiles with -O0 is probably a > bug...
No, GCC cannot in general detect whether your asm code is buggy. The assembler however can detect many asm bugs, as it did in this case. The reason it worked with -O0 is that with -O0 you get different generated code (namely, very inefficient code). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29808