This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C PATCH] Clear C_TYPE_INCOMPLETE_VARS even on variant types (PR debug/69518)
- From: Marek Polacek <polacek at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, Jan Hubicka <hubicka at ucw dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 29 Jan 2016 21:19:23 +0100
- Subject: Re: [C PATCH] Clear C_TYPE_INCOMPLETE_VARS even on variant types (PR debug/69518)
- Authentication-results: sourceware.org; auth=none
- References: <20160129194118 dot GU3017 at tucnak dot redhat dot com>
On Fri, Jan 29, 2016 at 08:41:18PM +0100, Jakub Jelinek wrote:
> Hi!
>
> We ICE on the following testcase, because the C FE abuses TYPE_VFIELD
> for its FE stuff, but may leak it to the middle-end.
> We clear it for TYPE_MAIN_VARIANT (and only use it for that), but
> for the other variants it could be non-NULL, because build_variant_type*
> would just copy that field over.
>
> Fixed by clearing it on all the variant types.
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2016-01-29 Jakub Jelinek <jakub@redhat.com>
>
> PR debug/69518
> * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
> all type variants, not just TYPE_MAIN_VARIANT.
>
> * gcc.dg/torture/pr69518.c: New test.
Ok.
Marek