aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2016-05-25 14:58:39 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2016-05-25 14:58:39 +0000
commita23faf7a4f172a09bfb095081491dff1225cbf52 (patch)
tree017c80345fc2b353a4bb9339f25c9182f4f6baf4 /gcc/c
parent95efe6b6f4aea5255aef35e1c150d229f490af6e (diff)
downloadgcc-a23faf7a4f172a09bfb095081491dff1225cbf52.zip
gcc-a23faf7a4f172a09bfb095081491dff1225cbf52.tar.gz
gcc-a23faf7a4f172a09bfb095081491dff1225cbf52.tar.bz2
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
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog3
-rw-r--r--gcc/c/c-decl.c7
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index d74423b..f3bb0e9 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -3,6 +3,9 @@
PR c/71265
* c-decl.c (c_make_fname_decl): Don't check seen_error.
+ PR c/71266
+ * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
+
2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
* c-parser.c (c_parser_oacc_declare): Add support for
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))