Bug 28272 - ICE during bootstrap (possible wrong code at -O2).
ICE during bootstrap (possible wrong code at -O2).
Status: RESOLVED DUPLICATE of bug 28230
Product: gcc
Classification: Unclassified
Component: other
4.2.0
: P3 normal
: ---
Assigned To: Not yet assigned to anyone
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-05 15:47 UTC by Pawel Sikora
Modified: 2006-08-03 20:42 UTC (History)
1 user (show)

See Also:
Host: powerpc-linux
Target: powerpc-linux
Build: powerpc-linux
Known to work:
Known to fail:
Last reconfirmed:


Attachments
testcase (21.88 KB, application/octet-stream)
2006-07-05 15:53 UTC, Pawel Sikora
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Sikora 2006-07-05 15:47:16 UTC
(gdb) set args  -fpreprocessed libgcc2.i -msecure-plt -quiet -dumpbase libgcc2.c -auxbase-strip libgcc/./_mulvsi3.o -ggdb -O2 -O2 -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -version -fno-strict-aliasing -fwrapv -fsigned-char -fPIC -fvisibility=hidden -mlong-double-128 -o libgcc2.s
(gdb) r
Starting program: /home/users/builder2/rpm/BUILD/trunk/builddir/gcc/cc1 -fpreprocessed libgcc2.i -msecure-plt -quiet -dumpbase libgcc2.c -auxbase-strip libgcc/./_mulvsi3.o -ggdb -O2 -O2 -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -version -fno-strict-aliasing -fwrapv -fsigned-char -fPIC -fvisibility=hidden -mlong-double-128 -o libgcc2.s
GNU C version 4.2.0 20060702 (experimental) (PLD-Linux) (ppc-pld-linux)
        compiled by GNU C version 4.2.0 20060702 (experimental) (PLD-Linux).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 75f4895a665b7260834d23a9cf08bcc6

Program received signal SIGSEGV, Segmentation fault.
mark_reg_store (reg=0xf7d2ee40, setter=<value optimized out>, data=<value optimized out>) at ../../gcc/global.c:1715
1715              SET_REGBIT (hard_reg_preferences,

(gdb) bt
#0  mark_reg_store (reg=0xf7d2ee40, setter=<value optimized out>, data=<value optimized out>) at ../../gcc/global.c:1715
#1  0x10372e10 in note_stores (x=0xf7d13c80, fun=0x104c38dc <mark_reg_store>, data=0x0) at ../../gcc/rtlanal.c:1368
#2  0x104c988c in global_alloc () at ../../gcc/global.c:830
#3  0x104c9bf4 in rest_of_handle_global_alloc () at ../../gcc/global.c:2509
#4  0x103d8b08 in execute_one_pass (pass=0x106c8c4c) at ../../gcc/passes.c:864
#5  0x103d8ccc in execute_pass_list (pass=0x106c8c4c) at ../../gcc/passes.c:911
#6  0x103d8ce4 in execute_pass_list (pass=0x106c60c8) at ../../gcc/passes.c:912
#7  0x100a42a4 in tree_rest_of_compilation (fndecl=0xf7d21100) at ../../gcc/tree-optimize.c:418
#8  0x1000e22c in c_expand_body (fndecl=0xffffffff) at ../../gcc/c-decl.c:6743
#9  0x10439a24 in cgraph_expand_function (node=0xf7d28700) at ../../gcc/cgraphunit.c:1112
#10 0x1043cbc0 in cgraph_optimize () at ../../gcc/cgraphunit.c:1177
#11 0x10019e24 in c_write_global_declarations () at ../../gcc/c-decl.c:7858
#12 0x1039d330 in toplev_main (argc=<value optimized out>, argv=<value optimized out>) at ../../gcc/toplev.c:1012
#13 0x1007fa50 in main (argc=-1, argv=0x107a155c) at ../../gcc/main.c:35

(gdb) p *reg
$1 = {code = REG, mode = SImode, jump = 0, call = 0, unchanging = 0, volatil = 0, in_struct = 0, used = 0, frame_related = 0,
  return_val = 0, u = {fld = {{rt_int = 125, rt_uint = 125, rt_str = 0x7d <Address 0x7d out of bounds>, rt_rtx = 0x7d, rt_rtvec = 0x7d,
        rt_type = 125, rt_addr_diff_vec_flags = {min_align = 0, base_after_vec = 0, min_after_vec = 0, max_after_vec = 0,
          min_after_base = 0, max_after_base = 0, offset_unsigned = 0, scale = 0}, rt_cselib = 0x7d, rt_bit = 0x7d, rt_tree = 0x7d,
        rt_bb = 0x7d, rt_mem = 0x7d, rt_reg = 0x7d, rt_constant = 0x7d}}, hwint = {536870912125}, block_sym = {fld = {{rt_int = 125,
          rt_uint = 125, rt_str = 0x7d <Address 0x7d out of bounds>, rt_rtx = 0x7d, rt_rtvec = 0x7d, rt_type = 125,
          rt_addr_diff_vec_flags = {min_align = 0, base_after_vec = 0, min_after_vec = 0, max_after_vec = 0, min_after_base = 0,
            max_after_base = 0, offset_unsigned = 0, scale = 0}, rt_cselib = 0x7d, rt_bit = 0x7d, rt_tree = 0x7d, rt_bb = 0x7d,
          rt_mem = 0x7d, rt_reg = 0x7d, rt_constant = 0x7d}, {rt_int = 125, rt_uint = 125, rt_str = 0x7d <Address 0x7d out of bounds>,
          rt_rtx = 0x7d, rt_rtvec = 0x7d, rt_type = 125, rt_addr_diff_vec_flags = {min_align = 0, base_after_vec = 0, min_after_vec = 0,
            max_after_vec = 0, min_after_base = 0, max_after_base = 0, offset_unsigned = 0, scale = 0}, rt_cselib = 0x7d, rt_bit = 0x7d,
          rt_tree = 0x7d, rt_bb = 0x7d, rt_mem = 0x7d, rt_reg = 0x7d, rt_constant = 0x7d}, {rt_int = 0, rt_uint = 0, rt_str = 0x0,
          rt_rtx = 0x0, rt_rtvec = 0x0, rt_type = VOIDmode, rt_addr_diff_vec_flags = {min_align = 0, base_after_vec = 0, min_after_vec = 0,
            max_after_vec = 0, min_after_base = 0, max_after_base = 0, offset_unsigned = 0, scale = 0}, rt_cselib = 0x0, rt_bit = 0x0,
          rt_tree = 0x0, rt_bb = 0x0, rt_mem = 0x0, rt_reg = 0x0, rt_constant = 0x0}}, block = 0xafafafaf, offset = -5787213827046133841},
    rv = {cl = 0, decimal = 0, sign = 0, signalling = 0, canonical = 0, uexp = 125, sig = {125, 0, 2947526575, 2947526575, 2947526575}}}}
Comment 1 Pawel Sikora 2006-07-05 15:53:07 UTC
Created attachment 11834 [details]
testcase
Comment 2 Andrew Pinski 2006-07-05 15:57:08 UTC
When you file a bug about bootstrap failure, can you the following information:
How you configured?
How did you invoke make?
What environment variable were set that could affect the options like CFLAGS?
Comment 3 Pawel Sikora 2006-07-05 17:06:37 UTC
(In reply to comment #2)
> When you file a bug about bootstrap failure, can you the following information:
> How you configured?

Reading specs from ./specs
Target: ppc-pld-linux
Configured with: ../configure --prefix=/usr --with-local-prefix=/usr/local
--libdir=/usr/lib --libexecdir=/usr/lib --infodir=/usr/share/info
--mandir=/usr/share/man --x-libraries=/usr/lib --enable-shared
--enable-threads=posix --enable-languages=c --enable-c99
--enable-long-long --disable-multilib --enable-nls --disable-werror
--with-gnu-as --with-gnu-ld --with-demangler-in-ld --with-system-zlib
--with-slibdir=/lib --without-system-libunwind --without-x
--with-long-double-128 --enable-secureplt --enable-bootstrap ppc-pld-linux
Thread model: posix
gcc version 4.2.0 20060702 (experimental) (PLD-Linux)

> How did you invoke make?

/usr/bin/make -C builddir
GCJFLAGS="-O2 -fno-strict-aliasing -fwrapv -fsigned-char -ggdb" \
BOOT_CFLAGS="-O2 -fno-strict-aliasing -fwrapv -fsigned-char -ggdb" \
STAGE1_CFLAGS="-O2 -fno-strict-aliasing -fwrapv -fsigned-char -ggdb -O0" \
GNATLIBCFLAGS="-O2 -fno-strict-aliasing -fwrapv -fsigned-char -ggdb" \
LDFLAGS_FOR_TARGET=""

with -O1 it builds.

> What environment variable were set that could affect the options like CFLAGS?
 
none.
Comment 4 Pawel Sikora 2006-08-03 20:42:23 UTC

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