This is the mail archive of the
mailing list for the GCC project.
Re: C PATCH for c/71573 (ICE with invalid redeclaration)
- From: Jeff Law <law at redhat dot com>
- To: Marek Polacek <polacek at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Joseph Myers <joseph at codesourcery dot com>
- Date: Fri, 29 Jul 2016 09:34:51 -0600
- Subject: Re: C PATCH for c/71573 (ICE with invalid redeclaration)
- Authentication-results: sourceware.org; auth=none
- References: <20160728151808.GG7007@redhat.com>
On 07/28/2016 09:18 AM, Marek Polacek wrote:
When we're trying to implicitly declare a function, we first search the scope
looking for whether the function identifier is already bound to a declaration.
But as the following test shows, we might find something else other than a
FUNCTION_DECL like we're expecting, which would mean that an ICE ensues. So
return early not only for error_mark_nodes, but also for anything that isn't a
Bootstrapped/regtested on x86_64-linux, ok for trunk?
2016-07-28 Marek Polacek <email@example.com>
* c-decl.c (implicitly_declare): Return decl early not only for
error_mark_nodes, but for anything that is not a FUNCTION_DECL.
* gcc.dg/noncompile/pr71573.c: New test.