[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699 --- Comment #18 from Richard Guenther rguenth at gcc dot gnu.org 2011-01-25 09:48:12 UTC --- Author: rguenth Date: Tue Jan 25 09:48:07 2011 New Revision: 169222 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=169222 Log: 2011-01-25 Richard Guenther rguent...@suse.de PR tree-optimization/47411 Backport from mainline 2010-06-30 Michael Matz m...@suse.de PR bootstrap/44699 * tree-vrp.c (vrp_finalize): Deal with changing num_ssa_names. Modified: branches/gcc-4_5-branch/gcc/ChangeLog branches/gcc-4_5-branch/gcc/tree-vrp.c
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
--- Comment #14 from iains at gcc dot gnu dot org 2010-06-30 08:39 --- (In reply to comment #13) @r161591 with this: The patch in http://gcc.gnu.org/ml/gcc-patches/2010-06/msg03011.html (and the patch to correct emit_unwind_label) === I no longer get the build_real fail - but this instead : /GCC/gcc-live-trunk/gcc/coverage.c: In function htab_counts_entry_hash: /GCC/gcc-live-trunk/gcc/coverage.c:151:1: error: unrecognizable insn: (insn 28 7 29 2 /GCC/gcc-live-trunk/gcc/coverage.c:150 (set (reg:DI 1 dx) (mem/s:SI (plus:DI (reg/v/f:DI 5 di [orig:64 of ] [64]) (const_int 4 [0x4])) [8 entry_2-ctr+0 S4 A32])) -1 (nil)) /GCC/gcc-live-trunk/gcc/coverage.c:151:1: internal compiler error: in extract_insn, at recog.c:2127 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
--- Comment #15 from iains at gcc dot gnu dot org 2010-06-30 08:59 --- (In reply to comment #14) (In reply to comment #13) @r161591 with this: The patch in http://gcc.gnu.org/ml/gcc-patches/2010-06/msg03011.html (and the patch to correct emit_unwind_label) === I no longer get the build_real fail - but this instead : /GCC/gcc-live-trunk/gcc/coverage.c: In function htab_counts_entry_hash: /GCC/gcc-live-trunk/gcc/coverage.c:151:1: error: unrecognizable insn: (insn 28 7 29 2 /GCC/gcc-live-trunk/gcc/coverage.c:150 (set (reg:DI 1 dx) (mem/s:SI (plus:DI (reg/v/f:DI 5 di [orig:64 of ] [64]) (const_int 4 [0x4])) [8 entry_2-ctr+0 S4 A32])) -1 (nil)) /GCC/gcc-live-trunk/gcc/coverage.c:151:1: internal compiler error: in extract_insn, at recog.c:2127 ah, that's PR44721 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
--- Comment #16 from matz at gcc dot gnu dot org 2010-06-30 16:34 --- Subject: Bug 44699 Author: matz Date: Wed Jun 30 16:34:22 2010 New Revision: 161614 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=161614 Log: PR bootstrap/44699 * tree-vrp.c (vrp_finalize): Deal with changing num_ssa_names. * gimple-fold.c (gimplify_and_update_call_from_tree): If LHS is a gimple reg, attach the original VDEF to the last store in the sequence. testsuite/ PR bootstrap/44699 * gcc.dg/pr44699.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr44699.c Modified: trunk/gcc/ChangeLog trunk/gcc/gimple-fold.c trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-vrp.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
--- Comment #17 from matz at gcc dot gnu dot org 2010-06-30 16:54 --- Testcases are fixed. And according to http://gcc.gnu.org/ml/gcc-patches/2010-06/msg03137.html we can probably also assume the bootstrap fail is fixed. -- matz at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
-- rguenth at gcc dot gnu dot org changed: What|Removed |Added OtherBugsDependingO||44592 nThis|| Target Milestone|--- |4.6.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
--- Comment #3 from matz at gcc dot gnu dot org 2010-06-29 11:31 --- Can you perhaps run the testsuite without bootstrapping (configure --disable-bootstrap; make; make check) to see if there occurs some more obvious bug than a miscompilation of genmodes? Debugging bootstrap miscompilations via bugzilla is difficult. The miscompile might be in bitmap_clear, perhaps there's something obvious, but a breaking testcase is much easier. (I do wonder though why the miscompile happens on darwin but not linux, even though the architecture is the same) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
--- Comment #4 from dominiq at lps dot ens dot fr 2010-06-29 12:06 --- On revision 161462 with the patch of revision 161496 I have located the problem in: static void create_modes (void) { /* make_int_mode (BI, 1, 1, ../../work/gcc/machmode.def, 176); */ make_int_mode (QI, -1U, 1, ../../work/gcc/machmode.def, 181); make_int_mode (HI, -1U, 2, ../../work/gcc/machmode.def, 182); } int main (int argc, char **argv) { create_modes (); } with the ICE in genmodes.c: In function 'new_mode.constprop.0': genmodes.c:2214:1: internal compiler error: Segmentation fault I'll continue to reduce the test later today. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
--- Comment #5 from dominiq at lps dot ens dot fr 2010-06-29 13:24 --- Created an attachment (id=21038) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21038action=view) reduced test The reduced test gives an ICE: [macbook] f90/bug% /opt/gcc/gcc4.6bw/bin/gcc -c -O2 genmodes.c genmodes.c: In function 'main': genmodes.c:152:1: internal compiler error: Segmentation fault -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
--- Comment #6 from dominiq at lps dot ens dot fr 2010-06-29 13:30 --- The backtrace for the reduced test of comment #5 is Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0022 0x0001007c320a in execute_vrp () (gdb) bt #0 0x0001007c320a in execute_vrp () #1 0x0001005794f4 in execute_one_pass () #2 0x0001005797cd in execute_pass_list () #3 0x0001005797df in execute_pass_list () #4 0x0001006a2e9c in tree_rest_of_compilation () #5 0x00010085e02d in cgraph_expand_function () #6 0x000100860e69 in cgraph_optimize () #7 0x0001008614fa in cgraph_finalize_compilation_unit () #8 0x00010001bc72 in c_write_global_declarations () #9 0x00010063d061 in toplev_main () #10 0x00011194 in start () -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
--- Comment #7 from matz at gcc dot gnu dot org 2010-06-29 13:47 --- Is /opt/gcc/gcc4.6bw/bin/gcc a bootstrapped compiler or one created without bootstrapping? The initial comment didn't reveal it, so maybe my assumption that it's a miscompiled cc1 is wrong. So, just to be crystal clear in the initial comment, the segfaulting compiler, is that the stage1 or the stage2 compiler? (you can check for the existence of stage1-gcc directory in the build-dir when the segfault happens, if there's such a directory then prev-gcc/xgcc is the stage2 compiler). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
--- Comment #8 from dominiq at lps dot ens dot fr 2010-06-29 14:36 --- Is /opt/gcc/gcc4.6bw/bin/gcc a bootstrapped compiler or one created without bootstrapping? Sorry for the confusion. /opt/gcc/gcc4.6bw/bin/gcc was built with revision 161462 and the patch of revision 161496 (see comment #4). The test case in comment #5 was extracted from the genmodes.i file generated by the prev-gcc/xgcc of the failed bootstrap. Using the corresponding cc1 with the reduced test, I get [macbook] f90/bug% /opt/gcc/mod_build_w_fail/prev-gcc/cc1 -O2 genmodes.c __inline_memcpy_chk find_mode new_mode make_int_mode create_modes main Analyzing compilation unit Performing interprocedural optimizations *free_lang_data visibility early_local_cleanups whole-program ipa-profile cp inline pure-const static-varAssembling functions: main genmodes.c: In function 'main': genmodes.c:152:1: internal compiler error: Segmentation fault -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
--- Comment #9 from matz at gcc dot gnu dot org 2010-06-29 14:48 --- Yes, but I'm asking if it was a bootstrapped compiler (in difference to one built with configuring with --disable-bootstrap) or not. If it was a bootstrapped compiler, are you saying that bootstrap fails with r161501 (initial comment), but works when using r161462 plus patch of 161496? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
--- Comment #10 from dominiq at lps dot ens dot fr 2010-06-29 14:57 --- Yes, but I'm asking if it was a bootstrapped compiler (in difference to one built with configuring with --disable-bootstrap) or not. If it was a bootstrapped compiler, are you saying that bootstrap fails with r161501 (initial comment), but works when using r161462 plus patch of 161496? The compiler was bootstrapped at revision 161436 then updated to 161443, 161455, 161459, and 161462, then updated with the patch leading to revision 161496 applied. What gives the reduced test case on a post r161496 gcc on linux? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
--- Comment #11 from matz at gcc dot gnu dot org 2010-06-29 15:15 --- I can reproduce now. It's also the non-bootstrapped compiler failing with the testcase, thanks for that. I'm on it. -- matz at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |matz at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2010-06-29 15:15:01 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
--- Comment #12 from iains at gcc dot gnu dot org 2010-06-29 18:45 --- also fails when the bootstrap compiler is gcc-4.2 (apple 4.2.1). i688-apple-darwin9 is ok for the same trunk rev. -- iains at gcc dot gnu dot org changed: What|Removed |Added CC||iains at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
--- Comment #13 from dominiq at lps dot ens dot fr 2010-06-29 22:40 --- Created an attachment (id=21042) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21042action=view) preprocessed tree.i The patch in http://gcc.gnu.org/ml/gcc-patches/2010-06/msg03011.html fixes the reported ICE but causes a new one with tree.c: [macbook] build_w/gcc% /opt/gcc/build_w/prev-gcc/xgcc -B/opt/gcc/build_w/prev-gcc/ -c -O2 -DIN_GCC -DHAVE_CONFIG_H -I. -I. -I../../work/gcc -I../../work/gcc/. -I../../work/include -I../../work/libcpp/include -I/opt/sw64/include ../../work/gcc/tree.c ../../work/gcc/tree.c: In function 'build_real': ../../work/gcc/tree.c:1441:1: internal compiler error: Segmentation fault The backtrace for tree.i is Reason: KERN_INVALID_ADDRESS at address: 0x000c 0x000100ad23c0 in useless_type_conversion_p () (gdb) bt #0 0x000100ad23c0 in useless_type_conversion_p () #1 0x000100a0035a in may_propagate_copy () #2 0x000100a8863d in replace_phi_args_in () #3 0x000100a889cc in substitute_and_fold () #4 0x000100b3c2e1 in vrp_finalize () #5 0x000100b3c440 in execute_vrp () #6 0x0001007e24fa in execute_one_pass () #7 0x0001007e28eb in execute_pass_list () #8 0x0001007e2909 in execute_pass_list () #9 0x00010099668b in tree_rest_of_compilation () #10 0x000100c2b2f6 in cgraph_expand_function () #11 0x000100c2b58d in cgraph_expand_all_functions () #12 0x000100c2bc5f in cgraph_optimize () #13 0x000100c292e9 in cgraph_finalize_compilation_unit () #14 0x00010002ef94 in c_write_global_declarations () #15 0x0001008fbeb9 in compile_file () #16 0x0001008fe96b in do_compile () #17 0x0001008fea35 in toplev_main () #18 0x00010010d450 in main () -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
--- Comment #1 from dominiq at lps dot ens dot fr 2010-06-28 17:21 --- Last successful bootstrap at revision 161470. -- dominiq at lps dot ens dot fr changed: What|Removed |Added Severity|normal |blocker http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699
[Bug bootstrap/44699] [4.6 Regression] Bootstrap failure for x86_64-apple-darwin10: ICE while compiling genmodes.c
--- Comment #2 from dominiq at lps dot ens dot fr 2010-06-28 18:55 --- This is caused by revision 161496: Author: matz Date: Mon Jun 28 15:14:31 2010 UTC (2 hours, 52 minutes ago) Changed paths: 4 Log Message: PR middle-end/44592 * gimple-fold.c (gimplify_and_update_call_from_tree): Maintain proper VDEF chain for intermediate stores in the sequence. testsuite/ PR middle-end/44592 * gfortran.dg/pr44592.f90: New test. -- dominiq at lps dot ens dot fr changed: What|Removed |Added CC||matz at suse dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44699