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

* [Bug c/24548] 3.4 regression: __builtin_constant_p not resolved with -O2
  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 ` djohnson+gcc at sw dot starentnetworks dot com
  2005-10-26 20:56 ` djohnson+gcc at sw dot starentnetworks dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 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



------- Comment #1 from djohnson+gcc at sw dot starentnetworks dot com  2005-10-26 20:55 -------
Created an attachment (id=10066)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10066&action=view)
preprocessed output


-- 


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


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

* [Bug c/24548] 3.4 regression: __builtin_constant_p not resolved with -O2
  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
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: djohnson+gcc at sw dot starentnetworks dot com @ 2005-10-26 20:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from djohnson+gcc at sw dot starentnetworks dot com  2005-10-26 20:56 -------
Created an attachment (id=10067)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10067&action=view)
compiler output


-- 


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


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

* [Bug middle-end/24548] 3.4 regression: __builtin_constant_p not resolved with -O2
  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 ` 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
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-26 21:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2005-10-26 21:25 -------
I don't think this is a GCC bug as what is happening is that something is being
inlined which did not get inlined before.


-- 


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


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

* [Bug middle-end/24548] [4.0/4.1/4.2 Regression] __builtin_constant_p not resolved with -O2
  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
                   ` (2 preceding siblings ...)
  2005-10-26 21:25 ` [Bug middle-end/24548] " pinskia at gcc dot gnu dot org
@ 2006-06-04 20:00 ` 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
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2006-06-04 20:00 UTC (permalink / raw)
  To: gcc-bugs



-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|3.4 regression:             |[4.0/4.1/4.2 Regression]
                   |__builtin_constant_p not    |__builtin_constant_p not
                   |resolved with -O2           |resolved with -O2
   Target Milestone|---                         |4.1.2


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


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

* [Bug middle-end/24548] [4.0/4.1 Regression] __builtin_constant_p not resolved with -O2
  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
                   ` (3 preceding siblings ...)
  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 ` pinskia at gcc dot gnu dot org
  2007-02-14  9:08 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-27 20:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-08-27 20:18 -------
This works for me on the mainline.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0/4.1/4.2 Regression]    |[4.0/4.1 Regression]
                   |__builtin_constant_p not    |__builtin_constant_p not
                   |resolved with -O2           |resolved with -O2


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


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

* [Bug middle-end/24548] [4.0/4.1 Regression] __builtin_constant_p not resolved with -O2
  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
                   ` (4 preceding siblings ...)
  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
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14  9:08 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.2                       |4.1.3


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


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

* [Bug middle-end/24548] [4.0/4.1 Regression] __builtin_constant_p not resolved with -O2
  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
                   ` (5 preceding siblings ...)
  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
  7 siblings, 0 replies; 9+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-11-28 17:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from manu at gcc dot gnu dot org  2007-11-28 17:32 -------
Dave, could you check this with a recent release?


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu dot org
             Status|UNCONFIRMED                 |WAITING


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


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

* [Bug middle-end/24548] [4.0 Regression] __builtin_constant_p not resolved with -O2
  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
                   ` (6 preceding siblings ...)
  2007-11-28 17:33 ` manu at gcc dot gnu dot org
@ 2008-01-26 12:12 ` rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-26 12:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2008-01-26 12:02 -------
Works for me with 4.1.3.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED
            Summary|[4.0/4.1 Regression]        |[4.0 Regression]
                   |__builtin_constant_p not    |__builtin_constant_p not
                   |resolved with -O2           |resolved with -O2


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).