I can't get GCC trunk to compile on mingw32. The build dies with the following
segfault:

/home/coudert/ibin/./gcc/xgcc -B/home/coudert/ibin/./gcc/
-B/mingw/i686-pc-mingw32/bin/ -B/mingw/i686-pc-mingw32/lib/ -isystem
/mingw/i686-pc-mingw32/include -isystem /mingw/i686-pc-mingw32/sys-include -O2
-I../../gcc/gcc/../winsup/w32api/include -O2 -g -O2  -DIN_GCC    -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
 -isystem ./include   -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../gcc/gcc -I../../gcc/gcc/.
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include
-I/home/coudert/local/include  -I../../gcc/gcc/../libdecnumber
-I../libdecnumber -DL__main -c ../../gcc/gcc/libgcc2.c -o libgcc/./__main.o
../../gcc/gcc/libgcc2.c: In function '__do_global_ctors':
../../gcc/gcc/libgcc2.c:2109: 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.
make[4]: *** [libgcc/./__main.o] Error 1
make[4]: Leaving directory `/home/coudert/ibin/gcc'
make[3]: *** [libgcc.a] Error 2
make[3]: Leaving directory `/home/coudert/ibin/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/home/coudert/ibin'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/coudert/ibin'
make: *** [all] Error 2


The gdb backtrace of the segfault is

Program received signal SIGSEGV, Segmentation fault.
0x00a7068f in df_chain_unlink (dflow=0x1857c38, ref=0x184d4d8, link=0x184e1f8)
    at ../../gcc/gcc/df-problems.c:110
110                   chain = chain->next;
(gdb) where
#0  0x00a7068f in df_chain_unlink (dflow=0x1857c38, ref=0x184d4d8, 
    link=0x184e1f8) at ../../gcc/gcc/df-problems.c:110
#1  0x00a706d8 in df_chain_unlink (dflow=0x1857c38, ref=0x184d418, link=0x0)
    at ../../gcc/gcc/df-problems.c:125
#2  0x00ab9cd4 in df_reg_chain_unlink (dflow=0x189d700, ref=0x184d418)
    at ../../gcc/gcc/df-scan.c:635
#3  0x00ab9fdd in df_insn_refs_delete (dflow=0x189d700, insn=0x18c5348)
    at ../../gcc/gcc/df-scan.c:743
#4  0x00aba0b7 in df_bb_refs_delete (dflow=0x189d700, bb_index=5)
    at ../../gcc/gcc/df-scan.c:768
#5  0x00ab903b in df_scan_free_bb_info (dflow=0x189d700, bb=0x18ab7d0, 
    vbb_info=0x164fae0) at ../../gcc/gcc/df-scan.c:189
#6  0x00a6e3f9 in df_set_blocks (df=0x176a118, blocks=0x164f83c)
    at ../../gcc/gcc/df-core.c:373
During symbol reading, struct/union type gets multiply defined: union
tree_node.
During symbol reading, struct/union type gets multiply defined: struct
basic_block_def.
During symbol reading, struct/union type gets multiply defined: union
tree_node.
During symbol reading, struct/union type gets multiply defined: union
tree_node.
During symbol reading, struct/union type gets multiply defined: struct rtx_def.
#7  0x008991d6 in iv_analysis_loop_init (loop=<incomplete type>)
    at ../../gcc/gcc/loop-iv.c:267
#8  0x0087e321 in predict_loops (loops_info=0x22fd40, rtlsimpleloops=1 '\001')
    at ../../gcc/gcc/predict.c:618
#9  0x0087ebb6 in estimate_probability (loops_info=0x22fd40)
    at ../../gcc/gcc/predict.c:842
#10 0x007b1f12 in rest_of_handle_branch_prob () at ../../gcc/gcc/profile.c:1363
#11 0x006d4e23 in execute_one_pass (pass=0xafc6b0)
    at ../../gcc/gcc/passes.c:849
#12 0x006d4ede in execute_pass_list (pass=0xafc6b0)
    at ../../gcc/gcc/passes.c:881
#13 0x006d4ef9 in execute_pass_list (pass=0xafb370)
    at ../../gcc/gcc/passes.c:882
#14 0x006d27ce in tree_rest_of_compilation (fndecl=0x1897a00)
    at ../../gcc/gcc/tree-optimize.c:412
#15 0x0041f8fd in c_expand_body (fndecl=0x1897a00)
    at ../../gcc/gcc/c-decl.c:6689
#16 0x006cb06c in cgraph_expand_function (node=0x1897c80)
    at ../../gcc/gcc/cgraphunit.c:1098
#17 0x006cb2ef in cgraph_expand_all_functions ()
    at ../../gcc/gcc/cgraphunit.c:1164
#18 0x006cbd27 in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1431
#19 0x00422621 in c_write_global_declarations () at ../../gcc/gcc/c-decl.c:7804
#20 0x0065b9cb in compile_file () at ../../gcc/gcc/toplev.c:1003
#21 0x0065d125 in do_compile () at ../../gcc/gcc/toplev.c:1948
#22 0x0065d188 in toplev_main (argc=49, argv=0x3d48c0)
    at ../../gcc/gcc/toplev.c:1980
#23 0x004a53ec in main (argc=49, argv=0x3d48c0) at ../../gcc/gcc/main.c:35


-- 
           Summary: segfault on mingw32
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fxcoudert at gcc dot gnu dot org
 GCC build triplet: i686-pc-mingw32
  GCC host triplet: i686-pc-mingw32
GCC target triplet: i686-pc-mingw32


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

Reply via email to