diff options
author | Simon Martin <simartin@users.sourceforge.net> | 2011-05-02 20:13:08 +0000 |
---|---|---|
committer | Simon Martin <simartin@gcc.gnu.org> | 2011-05-02 20:13:08 +0000 |
commit | 2609a0ce534be7a39dce4dee437eab54503e9b5e (patch) | |
tree | 3ce53fd74324b870d006b4070528082607ff2818 /gcc/c-decl.c | |
parent | 14dccaf06971f4ebea8f0821a1013de9d43829a3 (diff) | |
download | gcc-2609a0ce534be7a39dce4dee437eab54503e9b5e.zip gcc-2609a0ce534be7a39dce4dee437eab54503e9b5e.tar.gz gcc-2609a0ce534be7a39dce4dee437eab54503e9b5e.tar.bz2 |
re PR c/35445 (ICE with conflicting declarations)
gcc/
2011-05-02 Simon Martin <simartin@users.sourceforge.net>
PR c/35445
* c-decl.c (finish_decl): Only create a composite if the types are
compatible.
gcc/testsuite/
2011-05-02 Simon Martin <simartin@users.sourceforge.net>
PR c/35445
* gcc.dg/pr35445.c: New test.
From-SVN: r173269
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index ce6fd2a..3470a93 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -4246,7 +4246,7 @@ finish_decl (tree decl, location_t init_loc, tree init, b_ext = b_ext->shadowed; if (b_ext) { - if (b_ext->u.type) + if (b_ext->u.type && comptypes (b_ext->u.type, type)) b_ext->u.type = composite_type (b_ext->u.type, type); else b_ext->u.type = type; |