http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55755
Bug #: 55755
Summary: Invalid VIEW_CONVERT_EXPR produced by SRA
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: [email protected]
ReportedBy: [email protected]
Sigh. Even after all those years I can still occasionally come up with
an ICEing SRA testcase (it's basically a slightly modified
/home/mjambor/gcc/mine/src/gcc/testsuite/gcc.dg/torture/pr47228.c).
To be run with -O only, fails on x86_64-linux trunk, 4.7, and 4.6
(when checking is enabled):
/* { dg-do run } */
/* { dg-require-effective-target int32plus } */
struct S4
{
unsigned f0:24;
} __attribute__((__packed__));
struct S4 g_10 = {
6210831
};
struct S5
{
int i;
struct S4 l_8[2];
} __attribute__((__packed__));
int a, b;
struct S4 func_2 (int x)
{
struct S5 l = {
0,
{{0}, {0}}
};
l.i = a;
g_10 = l.l_8[1];
for (; x<2; x++) {
struct S4 tmp = {
11936567
};
l.l_8[x] = tmp;
}
b = l.i;
return g_10;
}
int main (void)
{
func_2 (0);
return 0;
}