From a23faf7a4f172a09bfb095081491dff1225cbf52 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Wed, 25 May 2016 14:58:39 +0000 Subject: re PR c/71266 (gcc ICE on x86_64-linux-gnu in "store_parm_decls_oldstyle") PR c/71266 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs. * gcc.dg/noncompile/old-style-parm-3.c: New test. From-SVN: r236708 --- gcc/c/c-decl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gcc/c/c-decl.c') diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index d7c3783..d79802e 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -8605,8 +8605,11 @@ store_parm_decls_oldstyle (tree fndecl, const struct c_arg_info *arg_info) continue; /* If we got something other than a PARM_DECL it is an error. */ if (TREE_CODE (decl) != PARM_DECL) - error_at (DECL_SOURCE_LOCATION (decl), - "%qD declared as a non-parameter", decl); + { + error_at (DECL_SOURCE_LOCATION (decl), + "%qD declared as a non-parameter", decl); + continue; + } /* If the declaration is already marked, we have a duplicate name. Complain and ignore the duplicate. */ else if (seen_args.contains (decl)) -- cgit v1.1