This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/37056] New: ICE in build2_stat, at tree.c:3257
- From: "kkojima at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Aug 2008 06:41:36 -0000
- Subject: [Bug tree-optimization/37056] New: ICE in build2_stat, at tree.c:3257
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The mainline compiler (trunk revision 138833) fails to compile
the test case below with -O1:
foo.c:24: internal compiler error: in build2_stat, at tree.c:3257
static union {
char buf[12 * sizeof (long long)];
} u;
int main ()
{
int off, len, i;
char *p, *q;
for (off = 0; off < (sizeof (long long)); off++)
for (len = 1; len < (10 * sizeof (long long)); len++)
{
for (i = 0; i < (12 * sizeof (long long)); i++)
u.buf[i] = 'a';
p = (__extension__ (__builtin_constant_p ('\0') && ('\0') == '\0'
? ({void *__s = (u.buf + off); __s;})
: memset (u.buf + off, '\0', len)));
if (p != u.buf + off)
abort ();
for (i = 0; i < off; i++, q++)
if (*q != 'a')
abort ();
}
}
--
Summary: ICE in build2_stat, at tree.c:3257
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kkojima at gcc dot gnu dot org
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37056