Bug 46440 - [4.5 Regression] ICE: in rtl_verify_flow_info, at cfgrtl.c:2165 with -fstack-protector-all -fno-tree-dominator-opts -fno-tree-fre
Summary: [4.5 Regression] ICE: in rtl_verify_flow_info, at cfgrtl.c:2165 with -fstack-...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.6.0
: P2 normal
Target Milestone: 4.5.2
Assignee: Jakub Jelinek
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2010-11-11 19:41 UTC by Zdenek Sojka
Modified: 2010-12-07 15:41 UTC (History)
1 user (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work: 4.4.6, 4.5.0, 4.6.0
Known to fail: 4.5.1, 4.5.2
Last reconfirmed: 2010-11-15 13:52:07


Attachments
reduced testcase (from gcc.dg/tree-ssa/pr17141-2.c) (103 bytes, text/plain)
2010-11-11 19:41 UTC, Zdenek Sojka
Details
gcc46-pr46440.patch (838 bytes, patch)
2010-11-15 13:52 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2010-11-11 19:41:16 UTC
Created attachment 22375 [details]
reduced testcase (from gcc.dg/tree-ssa/pr17141-2.c)

Compiler output:
$ gcc -O -fstack-protector-all -fno-tree-dominator-opts -fno-tree-fre pr46440.c 
pr46440.c: In function 'foo':
pr46440.c:16:1: error: verify_flow_info: Incorrect fallthru 2->3
pr46440.c:16:1: error: wrong insn in the fallthru edge
(barrier 15 24 33)
pr46440.c:16:1: internal compiler error: in rtl_verify_flow_info, at cfgrtl.c:2165
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r166509 - crash
r153685 - crash
4.5 r166509 - crash
4.4 r166509 - OK
Comment 1 Jakub Jelinek 2010-11-15 11:49:40 UTC
Caused by r145283.
Comment 2 Jakub Jelinek 2010-11-15 13:52:07 UTC
Created attachment 22398 [details]
gcc46-pr46440.patch

Untested fix.
Comment 3 Jakub Jelinek 2010-11-17 13:02:34 UTC
Author: jakub
Date: Wed Nov 17 13:02:31 2010
New Revision: 166867

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166867
Log:
	PR rtl-optimization/46440
	* combine.c (update_cfg_for_uncondjump): When changing
	an indirect jump into unconditional jump, remove BARRIERs
	from bb's footer.

	* gcc.dg/pr46440.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr46440.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/combine.c
    trunk/gcc/testsuite/ChangeLog
Comment 4 Jakub Jelinek 2010-11-17 13:03:42 UTC
Fixed for 4.6 so far.
Comment 5 Jakub Jelinek 2010-12-07 15:08:57 UTC
Author: jakub
Date: Tue Dec  7 15:08:54 2010
New Revision: 167539

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167539
Log:
	Backport from mainline
	2010-11-17  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/46440
	* combine.c (update_cfg_for_uncondjump): When changing
	an indirect jump into unconditional jump, remove BARRIERs
	from bb's footer.

	* gcc.dg/pr46440.c: New test.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/pr46440.c
Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/combine.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
Comment 6 Jakub Jelinek 2010-12-07 15:41:23 UTC
Fixed.