[Bug c/36359] [Regression] compile error in linux-kernel 2.6.26-rc4 with -O2

aldot at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Jun 10 11:08:00 GMT 2008



------- Comment #12 from aldot at gcc dot gnu dot org  2008-06-10 11:07 -------
smallish testcase, fwiw.

$ gcc -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
-fno-common -Werror-implicit-function-declaration -fno-stack-protector
-mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2  -march=i686
-ffreestanding -pipe -fno-asynchronous-unwind-tables -mno-sse -mno-mmx
-mno-sse2 -mno-3dnow -O2 -c -o pr.o pr36359.c
$ nm pr.o 
         U argh
00000000 T foo
         U urb
$ cat pr36359.c 
extern int urb;
int argh(void);
void foo(void)
{
        if (urb <= 0)
                return;
        urb = __builtin_constant_p(urb) ? 0x0815 : argh();
}


-- 

aldot at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aldot at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36359



More information about the Gcc-bugs mailing list