diff options
author | Marek Polacek <polacek@redhat.com> | 2016-02-24 21:47:59 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2016-02-24 21:47:59 +0000 |
commit | 0b05329bbfaade628e97f5d33165f82337865153 (patch) | |
tree | 129d48f696abba50424da8117a9d088ef3d1c3af /gcc/c/c-decl.c | |
parent | 944e9f5feea2ef45badd508d639f2b5802f3824d (diff) | |
download | gcc-0b05329bbfaade628e97f5d33165f82337865153.zip gcc-0b05329bbfaade628e97f5d33165f82337865153.tar.gz gcc-0b05329bbfaade628e97f5d33165f82337865153.tar.bz2 |
re PR c/69819 (ICE on invalid code on x86_64-linux-gnu in tree check: expected function_type or method_type, have array_type in function_args_iter_init, at tree.h:4536)
PR c/69819
* c-decl.c (finish_decl): Don't update the copy of the type of a
different decl type.
* gcc.dg/pr69819.c: New test.
From-SVN: r233683
Diffstat (limited to 'gcc/c/c-decl.c')
-rw-r--r-- | gcc/c/c-decl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 8e332f8..298036a 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -4743,7 +4743,7 @@ finish_decl (tree decl, location_t init_loc, tree init, struct c_binding *b_ext = I_SYMBOL_BINDING (DECL_NAME (decl)); while (b_ext && !B_IN_EXTERNAL_SCOPE (b_ext)) b_ext = b_ext->shadowed; - if (b_ext) + if (b_ext && TREE_CODE (decl) == TREE_CODE (b_ext->decl)) { if (b_ext->u.type && comptypes (b_ext->u.type, type)) b_ext->u.type = composite_type (b_ext->u.type, type); |