Bug 44336 - [4.4/4.5 Regression] ICE: verify_ssa failed: SSA_NAME_DEF_STMT is wrong with -fipa-struct-reorg -fwhole-program
Summary: [4.4/4.5 Regression] ICE: verify_ssa failed: SSA_NAME_DEF_STMT is wrong with ...
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.6.0
: P2 normal
Target Milestone: 4.4.6
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2010-05-30 22:04 UTC by Zdenek Sojka
Modified: 2011-04-10 10:23 UTC (History)
1 user (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-05-31 10:53:15


Attachments
different testcase (88 bytes, text/plain)
2010-06-08 14:41 UTC, Zdenek Sojka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2010-05-30 22:04:10 UTC
Tested revisions:
r160052 - crash
r159523 - segfault (release checking)
r159387 - OK
r158969 - OK
r158095 - OK

Compiler output:
$ gcc -O1 -fipa-struct-reorg -fwhole-program testcase.c
testcase.c: In function 'main':
testcase.c:4:3: warning: return makes integer from pointer without a cast [enabled by default]
testcase.c:4:3: warning: function returns address of local variable [enabled by default]
testcase.c:5:1: error: SSA_NAME_DEF_STMT is wrong
Expected definition statement:
s.0_1 = (long int) &s.1;

Actual definition statement:
s.0_1 = (long int) &s;
testcase.c:5:1: internal compiler error: verify_ssa failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

----- testcase.c -----
int main ()
{
  struct { int i; } s[1];
  return s;
}
----------------------
Comment 1 Richard Biener 2010-05-31 10:53:15 UTC
Same ICE with -fipa-type-escape enabled in 4.4 and 4.5.
Comment 2 Zdenek Sojka 2010-06-08 14:41:50 UTC
Created attachment 20867 [details]
different testcase

This testcase fails with similiar message:
$ gcc -O1 -fipa-struct-reorg -fwhole-program pr44336-2.c
pr44336-2.c: In function 'main':
pr44336-2.c:11:1: error: SSA_NAME_DEF_STMT is wrong
Expected definition statement:
# .MEM_4 = VDEF <.MEM_3>
    D.2721_1 = foo (s.0);

Actual definition statement:
# .MEM_3 = VDEF <.MEM_2(D)>
    D.2721_1 = foo (s);
pr44336-2.c:11:1: internal compiler error: verify_ssa failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Fails in 4.4 r158133 and 4.5 r158978 too.
Comment 3 Richard Biener 2010-07-22 08:49:28 UTC
Fixed in 4.6 (by disabling struct-reorg).
Comment 4 Richard Biener 2011-04-10 10:23:49 UTC
struct-reorg has finally been removed.