[Bug c/22098] New: [4.0/4.1 Regression] ICE in compound literal gimplification
jsm28 at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Jun 16 21:33:00 GMT 2005
extern void abort (void);
extern void exit (int);
typedef __SIZE_TYPE__ size_t;
int
main (void)
{
int a = 0;
int *p;
size_t b;
b = (size_t)(p = &(int []){0, 1, 2}[1]);
if (*p != 1 || *(int *)b != 1)
abort ();
exit (0);
}
ICEs on mainline and 4.0 branch but not 3.4.4. The problem is the compound
literal address is considered TREE_CONSTANT which allows it to be duplicated by
fold, but gimplifying the same compound literal more than once yields an ICE.
I'll suggest an approach for a fix in a followup to
<http://gcc.gnu.org/ml/gcc-patches/2005-06/msg01448.html>.
t.c: In function 'main':
t.c:10: internal compiler error: in gimple_add_tmp_var, at gimplify.c:532
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: [4.0/4.1 Regression] ICE in compound literal
gimplification
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jsm28 at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22098
More information about the Gcc-bugs
mailing list