Bug 11297 - [3.4 Regression] ICE building abi_check.cc
Summary: [3.4 Regression] ICE building abi_check.cc
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: 3.4.0
Assignee: Jakub Jelinek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-23 18:25 UTC by Matt Kraai
Modified: 2004-01-17 04:22 UTC (History)
1 user (show)

See Also:
Host: powerpc-unknown-linux-gnu
Target: powerpc-unknown-linux-gnu
Build: powerpc-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2003-06-27 09:01:51


Attachments
log of relevant commands and their output (1.48 KB, text/plain)
2003-06-24 14:46 UTC, Matt Kraai
Details
preprocessed source (92.78 KB, text/plain)
2003-06-24 14:47 UTC, Matt Kraai
Details
log of commands for original problem (1.23 KB, text/plain)
2003-06-27 15:30 UTC, Matt Kraai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Kraai 2003-06-23 18:25:42 UTC
On my Debian 3.0 PowerPC system (with a private build of binutils 2.14), GCC
fails to bootstrap as follows:

`/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/scripts/testsuite_flags
--build-cxx` -DHAVE_CONFIG_H -I. -I../../../../../gcc/libstdc++-v3/testsuite
-I.. -nostdinc++
-I/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/include/powerpc-unknown-linux-gnu
-I/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/include
-I../../../../../gcc/libstdc++-v3/libsupc++    -O2 -g -O2  -g -O2 -D_GNU_SOURCE
 -msoft-float -fPIC -mstrict-align -c
../../../../../gcc/libstdc++-v3/testsuite/abi_check.cc
../../../../../gcc/libstdc++-v3/testsuite/abi_check.cc: In function `int
   main(int, char**)':
../../../../../gcc/libstdc++-v3/testsuite/abi_check.cc:456: internal compiler
error: Segmentation
   fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Andrew Pinski 2003-06-24 03:40:34 UTC
As with any other bug can you provide the preprocessed file?
Comment 2 Matt Kraai 2003-06-24 05:09:47 UTC
The problem is not reproducible with a preprocessed file.  Should I still submit it?  (Am I supposed to change the bug status back to NEW?)
Comment 3 Andrew Pinski 2003-06-24 05:14:57 UTC
Okay then this is a big bug as it is a memory corruption bug.
Comment 4 Giovanni Bajo 2003-06-24 13:14:17 UTC
Please provide:

- a log of the command line that causes segmentation fault, but with "-v" added 
to it.

- a log of how you generated the preprocessed source

- a log of the command line compiling the preprocessed source (and with -v) 
that shows that the bug is not reproducible this way.
Comment 5 Matt Kraai 2003-06-24 14:43:28 UTC
I cannot reproduce the error.  After I ran "cvs update -C", I now see a new and
different error:

/home/kraai/dev/gcc/build/gcc/xgcc -shared-libgcc
-B/home/kraai/dev/gcc/build/gcc/ -nostdinc++
-L/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/src
-L/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/src/.libs
-B/home/kraai/dev/gcc/install/powerpc-unknown-linux-gnu/bin/
-B/home/kraai/dev/gcc/install/powerpc-unknown-linux-gnu/lib/ -isystem
/home/kraai/dev/gcc/install/powerpc-unknown-linux-gnu/include -isystem
/home/kraai/dev/gcc/install/powerpc-unknown-linux-gnu/sys-include  -msoft-float
-fPIC -mstrict-align -shared -nostdlib /usr/lib/crti.o
/home/kraai/dev/gcc/build/gcc/nof/crtbeginS.o  .libs/allocator-inst.o
.libs/codecvt.o .libs/complex_io.o .libs/concept-inst.o .libs/ctype.o
.libs/demangle.o .libs/ext-inst.o .libs/fstream-inst.o .libs/functexcept.o
.libs/globals.o .libs/io-inst.o .libs/ios.o .libs/istream-inst.o .libs/limits.o
.libs/locale.o .libs/locale-inst.o .libs/localename.o .libs/misc-inst.o
.libs/ostream-inst.o .libs/sstream-inst.o .libs/stdexcept.o
.libs/streambuf-inst.o .libs/string-inst.o .libs/strstream.o
.libs/valarray-inst.o .libs/wstring-inst.o .libs/codecvt_members.o
.libs/collate_members.o .libs/ctype_members.o .libs/messages_members.o
.libs/monetary_members.o .libs/numeric_members.o .libs/time_members.o
.libs/basic_file.o .libs/c++locale.o -Wl,--whole-archive
../libmath/.libs/libmath.a ../libsupc++/.libs/libsupc++convenience.a
-Wl,--no-whole-archive 
-L/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/src
-L/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/src/.libs
-lm ../libmath/.libs/libmath.a -lm ../libsupc++/.libs/libsupc++convenience.a -lm
-L/home/kraai/dev/gcc/build/gcc/nof -L/home/kraai/dev/gcc/build/gcc
-L/home/kraai/dev/gcc/install/powerpc-unknown-linux-gnu/bin
-L/home/kraai/dev/gcc/install/powerpc-unknown-linux-gnu/lib
-L/home/kraai/dev/gcc/install/lib/../powerpc-unknown-linux-gnu/lib
-L/home/kraai/dev/gcc/install/lib -lgcc_s_nof -lc -lgcc_s_nof -lm -lgcc_s_nof
-lc -lgcc_s_nof   /home/kraai/dev/gcc/build/gcc/nof/crtsavres.o
/home/kraai/dev/gcc/build/gcc/nof/crtendS.o /usr/lib/crtn.o  -Wl,-O1
-Wl,--version-script=libstdc++-symbol.ver -Wl,-soname -Wl,libstdc++.so.6 -o
.libs/libstdc++.so.6.0.0
.libs/strstream.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[7]: *** [libstdc++.la] Error 1
make[7]: Leaving directory
`/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/src'

This problem is reproducible using a preprocessed source file, so I'll attach
both it and a log of the relevant commands and their output.
Comment 6 Matt Kraai 2003-06-24 14:46:29 UTC
Created attachment 4274 [details]
log of relevant commands and their output
Comment 7 Matt Kraai 2003-06-24 14:47:06 UTC
Created attachment 4275 [details]
preprocessed source
Comment 8 Matt Kraai 2003-06-26 18:04:16 UTC
ld produces an error because it is asked to generate a procedure linkage table
entry for a local symbol (see binutils-2.14.90.0.4.1/bfd/elf32-ppc.c:3384).

Here is an example of the assembly that produces a problem:

.LLSDACSE1673:
        .section        .text._ZNSt10istrstreamD1Ev
        .set    .LTHUNK0,_ZNSt10istrstreamD1Ev
        .section       
.gnu.linkonce.t._ZTv0_n12_NSt10istrstreamD1Ev,"awx",@progbits
        .align 2
        .weak   _ZTv0_n12_NSt10istrstreamD1Ev
        .type   _ZTv0_n12_NSt10istrstreamD1Ev, @function
_ZTv0_n12_NSt10istrstreamD1Ev:
.LFB1674:
        .file 9
"/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/include/backward/strstream"
        .loc 9 120 0
        lwz 12,0(3)
        addi 12,12,-12
        lwz 12,0(12)
        add 3,3,12
        b .LTHUNK0@plt

If I change

        b .LTHUNK0@plt

to

        b _ZNSt10istrstreamD1Ev@plt

(and likewise for the other such .LTHUNK labels), it assembles and links
successfully.
Comment 9 Andrew Pinski 2003-06-26 19:32:57 UTC
I think this related to bug 11331 which is for hppa but looks like the same bug.
Comment 10 Andrew Pinski 2003-06-26 19:35:48 UTC
From Olaf Hering <http://gcc.gnu.org/ml/gcc/2003-06/msg02204.html>:
The bug was introduced here:
cvs diff -pu -D 20030623 -D 20030624 

I see no rs6000 specific names there.
Comment 12 Matt Kraai 2003-06-27 15:28:36 UTC
The patch in comment #11 fixes the problem I encountered in comment #5, but not
the original problem I reported.  I am attaching a log of the commands requested
in comment #4.

Should I file a new report for the original bug?
Comment 13 Matt Kraai 2003-06-27 15:30:16 UTC
Created attachment 4296 [details]
log of commands for original problem
Comment 14 Matt Kraai 2003-06-28 05:37:52 UTC
http://gcc.gnu.org/ml/gcc-patches/2003-06/msg03004.html fixes my original problem, and has been committed.
Comment 15 Andrew Pinski 2003-07-07 03:50:41 UTC
Assigning to jakub@gcc.gnu.org who thought he assigned to himself but bugzilla was bit 
old back then.
Comment 16 Matt Kraai 2003-07-08 15:29:08 UTC
Jakub checked in the patch referenced in comment #11, fixing the bootstrap.