From 95efe6b6f4aea5255aef35e1c150d229f490af6e Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Wed, 25 May 2016 14:57:34 +0000 Subject: [PATCH] =?utf8?q?re=20PR=20c/71265=20(gcc=20ICE=20on=20x86=5F64-l?= =?utf8?q?inux-gnu=20with=20=E2=80=9Cseg=20fault=E2=80=9D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit PR c/71265 * c-decl.c (c_make_fname_decl): Don't check seen_error. * gcc.dg/noncompile/pr71265.c: New test. From-SVN: r236707 --- gcc/c/ChangeLog | 5 +++++ gcc/c/c-decl.c | 2 +- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/noncompile/pr71265.c | 7 +++++++ 4 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/noncompile/pr71265.c diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 2e3eeb1af3f..d74423b816d 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,8 @@ +2016-05-25 Marek Polacek + + PR c/71265 + * c-decl.c (c_make_fname_decl): Don't check seen_error. + 2016-05-24 Cesar Philippidis * 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 9441fbb3b40..d7c3783d989 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -3989,7 +3989,7 @@ c_make_fname_decl (location_t loc, tree id, int type_dep) the __FUNCTION__ is believed to appear in K&R style function parameter declarator. In that case we still don't have function_scope. */ - && (!seen_error () || current_function_scope)) + && current_function_scope) { DECL_CONTEXT (decl) = current_function_decl; bind (id, decl, current_function_scope, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d41af4e00c4..c1a5372bb7a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-05-25 Marek Polacek + + PR c/71265 + * gcc.dg/noncompile/pr71265.c: New test. + 2016-05-25 Nathan Sidwell * gcc.c-torture/execute/921110-1.c: Fix abort decl. diff --git a/gcc/testsuite/gcc.dg/noncompile/pr71265.c b/gcc/testsuite/gcc.dg/noncompile/pr71265.c new file mode 100644 index 00000000000..9c62aab1233 --- /dev/null +++ b/gcc/testsuite/gcc.dg/noncompile/pr71265.c @@ -0,0 +1,7 @@ +/* PR c/71265 */ +/* { dg-do compile } */ + +void ID (ID) + int ID [__func__]; /* { dg-error "size of array .ID. has non-integer type" } */ +{ +} -- 2.30.2