This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/34457] New: ICE with VLA and --combine
- From: "tromey at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Dec 2007 02:54:23 -0000
- Subject: [Bug c/34457] New: ICE with VLA and --combine
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I have two source files:
qq.c, derived from one of the nested test in c-torture
int
f(int argc, char **argv)
{
struct s { int a; char b[argc]; };
struct s t;
memset (&t, 0, sizeof(t));
t.a = 123;
return t.a + 5;
}
qr.c, which really can be anything
int x;
svn trunk ICEs with "gcc -c -O2 --combine qq.c qr.c":
opsy. gcc -c -O2 --combine qq.c qr.cqq.c: In function ?f?:
qq.c:6: warning: incompatible implicit declaration of built-in function
?memset?
qq.c:5: internal compiler error: tree check: expected integer_cst, have
var_decl in c_type_hash, at c-common.c:3174
c_common_get_alias_set returns early if num_in_fnames==1.
But with --combine, this is not so.
Then, c_type_hash crashes because it does not know what to do with
VLAs. It tries to take TREE_INT_CST_LOW of a VAR_DECL.
--
Summary: ICE with VLA and --combine
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tromey at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34457