public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15440] New: mainline C++ code generation bug at -O2
@ 2004-05-14 23:57 martin at mpa-garching dot mpg dot de
  2004-05-15  0:04 ` [Bug c++/15440] " martin at mpa-garching dot mpg dot de
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2004-05-14 23:57 UTC (permalink / raw)
  To: gcc-bugs

The attached testcase compiles without complaints. But when compiled
at -O2, running the generated executable produces a segmentation fault.
This problem was present on tree-ssa but not on pre-merge mainline.
Unfortunately I have failed to reduce the testcase further.

~/tmp>g++ -O2 -v bug.ii
Reading specs from /afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/3.5.0/spe
cs
Configured with: /scratch/gcc/configure --quiet --prefix=/afs/mpa/data/martin/ug
cc --enable-languages=c++
Thread model: posix
gcc version 3.5.0 20040514 (experimental)
 /afs/mpa/data/martin/ugcc/libexec/gcc/i686-pc-linux-gnu/3.5.0/cc1plus -fpreproc
essed bug.ii -quiet -dumpbase bug.ii -mtune=pentiumpro -auxbase bug -O2 -version
 -o /tmp/ccqlUGQX.s
GNU C++ version 3.5.0 20040514 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 3.5.0 20040514 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
 as -V -Qy -o /tmp/ccmVEshX.o /tmp/ccqlUGQX.s
GNU assembler version 2.14 (i686-pc-linux-gnu) using BFD version 2.14 20030612
 /afs/mpa/data/martin/ugcc/libexec/gcc/i686-pc-linux-gnu/3.5.0/collect2 --eh-fra
me-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/c
rti.o /afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/3.5.0/crtbegin.o -L/af
s/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/3.5.0 -L/afs/mpa/data/martin/ug
cc/lib/gcc/i686-pc-linux-gnu/3.5.0/../../.. /tmp/ccmVEshX.o -lstdc++ -lm -lgcc_s
 -lgcc -lc -lgcc_s -lgcc /afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/3.5
.0/crtend.o /usr/lib/crtn.o

~/tmp>./a.out
Segmentation fault

-- 
           Summary: mainline C++ code generation bug at -O2
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: martin at mpa-garching dot mpg dot de
                CC: gcc-bugs at gcc dot gnu dot org,martin at mpa-garching
                    dot mpg dot de
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c++/15440] mainline C++ code generation bug at -O2
  2004-05-14 23:57 [Bug c++/15440] New: mainline C++ code generation bug at -O2 martin at mpa-garching dot mpg dot de
@ 2004-05-15  0:04 ` martin at mpa-garching dot mpg dot de
  2004-05-15  0:20 ` martin at mpa-garching dot mpg dot de
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2004-05-15  0:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From martin at mpa-garching dot mpg dot de  2004-05-14 17:04 -------
Created an attachment (id=6289)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6289&action=view)
testcase to reproduce the bug


-- 


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


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

* [Bug c++/15440] mainline C++ code generation bug at -O2
  2004-05-14 23:57 [Bug c++/15440] New: mainline C++ code generation bug at -O2 martin at mpa-garching dot mpg dot de
  2004-05-15  0:04 ` [Bug c++/15440] " martin at mpa-garching dot mpg dot de
@ 2004-05-15  0:20 ` martin at mpa-garching dot mpg dot de
  2004-05-15  0:20 ` martin at mpa-garching dot mpg dot de
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2004-05-15  0:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From martin at mpa-garching dot mpg dot de  2004-05-14 17:12 -------
Created an attachment (id=6290)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6290&action=view)
the un-preprocessed version of the testcase


-- 


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


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

* [Bug c++/15440] mainline C++ code generation bug at -O2
  2004-05-14 23:57 [Bug c++/15440] New: mainline C++ code generation bug at -O2 martin at mpa-garching dot mpg dot de
  2004-05-15  0:04 ` [Bug c++/15440] " martin at mpa-garching dot mpg dot de
  2004-05-15  0:20 ` martin at mpa-garching dot mpg dot de
@ 2004-05-15  0:20 ` martin at mpa-garching dot mpg dot de
  2004-05-15  0:44 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2004-05-15  0:20 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code


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


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

* [Bug c++/15440] mainline C++ code generation bug at -O2
  2004-05-14 23:57 [Bug c++/15440] New: mainline C++ code generation bug at -O2 martin at mpa-garching dot mpg dot de
                   ` (2 preceding siblings ...)
  2004-05-15  0:20 ` martin at mpa-garching dot mpg dot de
@ 2004-05-15  0:44 ` pinskia at gcc dot gnu dot org
  2004-05-15  0:50 ` martin at mpa-garching dot mpg dot de
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-15  0:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-14 17:17 -------
I almost think this is a dup of bug 14029.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |14029


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


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

* [Bug c++/15440] mainline C++ code generation bug at -O2
  2004-05-14 23:57 [Bug c++/15440] New: mainline C++ code generation bug at -O2 martin at mpa-garching dot mpg dot de
                   ` (3 preceding siblings ...)
  2004-05-15  0:44 ` pinskia at gcc dot gnu dot org
@ 2004-05-15  0:50 ` martin at mpa-garching dot mpg dot de
  2004-05-15  3:26 ` pinskia at gcc dot gnu dot org
  2004-08-23  3:13 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2004-05-15  0:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From martin at mpa-garching dot mpg dot de  2004-05-14 17:22 -------
I don't see the similarity at first glance ;)
But I can confirm that the problem goes away when adding "fno-strict-aliasing"
to the command line.


-- 


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


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

* [Bug c++/15440] mainline C++ code generation bug at -O2
  2004-05-14 23:57 [Bug c++/15440] New: mainline C++ code generation bug at -O2 martin at mpa-garching dot mpg dot de
                   ` (4 preceding siblings ...)
  2004-05-15  0:50 ` martin at mpa-garching dot mpg dot de
@ 2004-05-15  3:26 ` pinskia at gcc dot gnu dot org
  2004-08-23  3:13 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-15  3:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-14 17:24 -------
Then it is a dup as this is a general problem currently.

*** This bug has been marked as a duplicate of 14029 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

* [Bug c++/15440] mainline C++ code generation bug at -O2
  2004-05-14 23:57 [Bug c++/15440] New: mainline C++ code generation bug at -O2 martin at mpa-garching dot mpg dot de
                   ` (5 preceding siblings ...)
  2004-05-15  3:26 ` pinskia at gcc dot gnu dot org
@ 2004-08-23  3:13 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-23  3:13 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 15440 depends on bug 14029, which changed state.

Bug 14029 Summary: [3.5 Regression] Miscompilation of unrolled loop due to Iterator::base having an aliasing problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14029

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

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


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

end of thread, other threads:[~2004-08-23  3:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-14 23:57 [Bug c++/15440] New: mainline C++ code generation bug at -O2 martin at mpa-garching dot mpg dot de
2004-05-15  0:04 ` [Bug c++/15440] " martin at mpa-garching dot mpg dot de
2004-05-15  0:20 ` martin at mpa-garching dot mpg dot de
2004-05-15  0:20 ` martin at mpa-garching dot mpg dot de
2004-05-15  0:44 ` pinskia at gcc dot gnu dot org
2004-05-15  0:50 ` martin at mpa-garching dot mpg dot de
2004-05-15  3:26 ` pinskia at gcc dot gnu dot org
2004-08-23  3:13 ` pinskia 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).