Summary: | [4.4 regression] GCC fails to rebuild itself with STAGE1_CFLAGS=-O1 | ||
---|---|---|---|
Product: | gcc | Reporter: | Laurent GUERBY <laurent> |
Component: | rtl-optimization | Assignee: | Eric Botcazou <ebotcazou> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | armin76, gcc-bugs, laurent, paul_koning, sjames, toolchain |
Priority: | P3 | Keywords: | ice-on-valid-code |
Version: | 4.4.2 | ||
Target Milestone: | 4.4.5 | ||
URL: | http://gcc.gnu.org/ml/gcc-patches/2010-09/msg01614.html | ||
Host: | sparc-linux | Target: | sparc-linux |
Build: | sparc-linux | Known to work: | 4.3.4 |
Known to fail: | 4.4.0, 4.4.1, 4.4.2, 4.4.3, 4.4.4 | Last reconfirmed: | 2010-09-19 12:47:04 |
Attachments: | Semi-reduced testcase |
Description
Laurent GUERBY
2010-01-17 15:52:14 UTC
Please try to reproduce with the 4.4.3 release candidate. (In reply to comment #1) > Please try to reproduce with the 4.4.3 release candidate. > gcc-4.4.3-RC-20100116 fails the same way. Same result for me with 4.4.3 RC1. backtrace: Program received signal SIGSEGV, Segmentation fault. 0x004ca580 in copy_virtual_operands () Current language: auto; currently asm (gdb) bt #0 0x004ca580 in copy_virtual_operands () #1 0x003d58a0 in gimple_duplicate_bb () #2 0x0010be80 in duplicate_block () #3 0x0010f5e8 in copy_bbs () #4 0x00118650 in duplicate_loop_to_header_edge () #5 0x004b9350 in gimple_duplicate_loop_to_header_edge () #6 0x004a5458 in canonicalize_loop_induction_variables () #7 0x004a62e8 in tree_unroll_loops_completely () #8 0x004c4d80 in tree_complete_unroll () #9 0x003052b8 in execute_one_pass () #10 0x00305494 in execute_pass_list () #11 0x003054b8 in execute_pass_list () #12 0x003054b8 in execute_pass_list () #13 0x0042ba74 in tree_rest_of_compilation () #14 0x005d05b0 in cgraph_expand_function () #15 0x005d2ab8 in cgraph_optimize () #16 0x00028308 in c_write_global_declarations () #17 0x003cbbb0 in toplev_main () #18 0x000adaf4 in main () Summary work/fail. Investigating. tree-ssa-operands.c:copy_virtual_operands is miscompiled by delay slot scheduling so the workaround is to use STAGE1_CFLAGS="-O1 -fno-delayed-branch". Another way out is probably to configure with --disable-stage1-checking. Created attachment 21847 [details]
Semi-reduced testcase
To be compiled at -O -mcpu=v8.
Subject: Bug 42775 Author: ebotcazou Date: Mon Sep 20 21:29:48 2010 New Revision: 164458 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164458 Log: PR rtl-optimization/42775 * cfgrtl.c (rest_of_pass_free_cfg): Recompute notes if delay slot scheduling is enabled. Modified: trunk/gcc/ChangeLog trunk/gcc/cfgrtl.c Subject: Bug 42775 Author: ebotcazou Date: Mon Sep 20 21:30:35 2010 New Revision: 164460 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164460 Log: PR rtl-optimization/42775 * cfgrtl.c (rest_of_pass_free_cfg): Recompute notes if delay slot scheduling is enabled. Modified: branches/gcc-4_5-branch/gcc/ChangeLog branches/gcc-4_5-branch/gcc/cfgrtl.c Subject: Bug 42775 Author: ebotcazou Date: Mon Sep 20 21:31:14 2010 New Revision: 164461 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164461 Log: PR rtl-optimization/42775 * cfgrtl.c (rest_of_pass_free_cfg): Recompute notes if delay slot scheduling is enabled. Modified: branches/gcc-4_4-branch/gcc/ChangeLog branches/gcc-4_4-branch/gcc/cfgrtl.c At last. *** Bug 48990 has been marked as a duplicate of this bug. *** Author: danglin Date: Tue May 24 18:47:14 2011 New Revision: 174133 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174133 Log: Backport from mainline: 2010-09-20 Eric Botcazou <ebotcazou@adacore.com> PR rtl-optimization/42775 * cfgrtl.c (rest_of_pass_free_cfg): Recompute notes if delay slot scheduling is enabled. Modified: branches/gcc-4_3-branch/gcc/ChangeLog branches/gcc-4_3-branch/gcc/cfgrtl.c |