Bug 58247 - [4.9 Regression] ICE in tree_unroll_loops_completely at -O3 (both 32-bit and 64-bit modes)
Summary: [4.9 Regression] ICE in tree_unroll_loops_completely at -O3 (both 32-bit and ...
Status: RESOLVED DUPLICATE of bug 57393
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: unknown
: P3 normal
Target Milestone: 4.9.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-27 04:56 UTC by Zhendong Su
Modified: 2013-08-30 07:56 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zhendong Su 2013-08-27 04:56:44 UTC
The following code causes an ICE when compiled with the current gcc trunk at -O3 on x86_64-linux in both 32-bit and 64-bit modes. This is a regression from 4.8.x.

It is likely a duplicate of 57592, although the stack traces are somewhat different.


$ gcc-trunk -v
gcc version 4.9.0 20130826 (experimental) [trunk revision 201986] (GCC) 
$ gcc-trunk -O2 -c reduced.c
$ gcc-4.8 -O3 -c reduced.c
$ gcc-trunk -O3 -c reduced.c
reduced.c: In function ‘foo’:
reduced.c:14:6: internal compiler error: Segmentation fault
 void foo ()
      ^
0x7e6a0f crash_signal
	../../gcc-trunk/gcc/toplev.c:335
0x80f55b ssa_default_def(function*, tree_node*)
	../../gcc-trunk/gcc/tree-dfa.c:314
0x80f820 get_or_create_ssa_default_def(function*, tree_node*)
	../../gcc-trunk/gcc/tree-dfa.c:362
0x82924a get_reaching_def
	../../gcc-trunk/gcc/tree-into-ssa.c:1184
0x82f1fa maybe_replace_use
	../../gcc-trunk/gcc/tree-into-ssa.c:1784
0x82f1fa rewrite_update_stmt
	../../gcc-trunk/gcc/tree-into-ssa.c:1967
0x82f1fa rewrite_update_enter_block
	../../gcc-trunk/gcc/tree-into-ssa.c:2136
0xb4d77a walk_dominator_tree(dom_walk_data*, basic_block_def*)
	../../gcc-trunk/gcc/domwalk.c:210
0x827f13 rewrite_blocks
	../../gcc-trunk/gcc/tree-into-ssa.c:2216
0x82e4ae update_ssa(unsigned int)
	../../gcc-trunk/gcc/tree-into-ssa.c:3319
0x8963fc rewrite_into_loop_closed_ssa(bitmap_head_def*, unsigned int)
	../../gcc-trunk/gcc/tree-ssa-loop-manip.c:501
0xbb23fa tree_unroll_loops_completely(bool, bool)
	../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.c:1205
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$ 


----------------------------------------------

int a, b, c;
unsigned int d;

void baz(); 

void bar ()
{
  int e;
  for (d = 1; d < 2; d = d - 1)
    for (e = 24; e; e = e - 3)
      a &= b >= e;
}

void foo ()
{
  for (;; b++)
    for (c = 0; c < 1; c++)
      {
	bar ();
	baz ();
      }
}
Comment 1 Richard Biener 2013-08-30 07:56:52 UTC
I see

t.c: In function 'foo':
t.c:14:6: error: definition in block 5 follows the use
 void foo ()
      ^
for SSA_NAME: _35 in statement:
a.2_88 = _32 & _35;
t.c:14:6: internal compiler error: verify_ssa failed

after reassoc.

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