From: Marek Polacek Date: Wed, 25 May 2016 14:57:34 +0000 (+0000) Subject: re PR c/71265 (gcc ICE on x86_64-linux-gnu with “seg fault”) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=95efe6b6f4aea5255aef35e1c150d229f490af6e;p=gcc.git re PR c/71265 (gcc ICE on x86_64-linux-gnu with “seg fault”) 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 --- 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" } */ +{ +}