public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/24548]  New: 3.4 regression: __builtin_constant_p not resolved with -O2
@ 2005-10-26 20:55 djohnson+gcc at sw dot starentnetworks dot com
  2005-10-26 20:55 ` [Bug c/24548] " djohnson+gcc at sw dot starentnetworks dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: djohnson+gcc at sw dot starentnetworks dot com @ 2005-10-26 20:55 UTC (permalink / raw)
  To: gcc-bugs

This looks similar to bug 19449, but with just __builtin_constant_p not
__builtin_choose_expr so I'm opening a new bug for this.


The following code works with 3.3.6, but with 3.4.4 it fails to resolve
__builtin_constant_p leading to link errors of unresolved symbols.

Code I'm seeing this in is linux 2.6.12 built for arm.  The occurance gcc is
having problems with is alloc_skb()'s call to kmalloc().  That call is for a
non-constant variable (size) so __builtin_constant_p() should result in zero.

Problem is present with -O2, however -O1 is resolving __builtin_constant_p
correctly.

I'll attach full preprocessed output as well as compiled output.

Compile line is:

arm-linux-gcc -Wp,-MD,net/core/.skbuff.o.d  -nostdinc -isystem
/net/gia/djohnson/tools/usr/local/starent/bintools/linux-arm/gcc/200510261510/lib/gcc/arm-linux/3.4.4/include
-D__KERNEL__ -Iinclude  -mbig-endian -Wall -Wstrict-prototypes -Wno-trigraphs
-fno-strict-aliasing -fno-common -ffreestanding -O2     -fno-omit-frame-pointer
-g -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mapcs-32
-D__LINUX_ARM_ARCH__=5 -march=armv5te -mtune=xscale -Wa,-mcpu=xscale
-malignment-traps -msoft-float -Uarm -Wdeclaration-after-statement    
-DKBUILD_BASENAME=skbuff -DKBUILD_MODNAME=skbuff -c -o net/core/.tmp_skbuff.o
net/core/skbuff.c

arm-linux-nm net/core/.tmp_skbuff.o |grep that_much
         U __you_cannot_kmalloc_that_much


-- 
           Summary: 3.4 regression: __builtin_constant_p not resolved with -
                    O2
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: djohnson+gcc at sw dot starentnetworks dot com
 GCC build triplet: i686-linux
  GCC host triplet: i686-linux
GCC target triplet: arm-linux


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-01-26 12:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-26 20:55 [Bug c/24548] New: 3.4 regression: __builtin_constant_p not resolved with -O2 djohnson+gcc at sw dot starentnetworks dot com
2005-10-26 20:55 ` [Bug c/24548] " djohnson+gcc at sw dot starentnetworks dot com
2005-10-26 20:56 ` djohnson+gcc at sw dot starentnetworks dot com
2005-10-26 21:25 ` [Bug middle-end/24548] " pinskia at gcc dot gnu dot org
2006-06-04 20:00 ` [Bug middle-end/24548] [4.0/4.1/4.2 Regression] " jsm28 at gcc dot gnu dot org
2006-08-27 20:18 ` [Bug middle-end/24548] [4.0/4.1 " pinskia at gcc dot gnu dot org
2007-02-14  9:08 ` mmitchel at gcc dot gnu dot org
2007-11-28 17:33 ` manu at gcc dot gnu dot org
2008-01-26 12:12 ` [Bug middle-end/24548] [4.0 " rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).