public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "wilson at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/66068] [6 Regression] error: type variant has different TYPE_VFIELD Date: Mon, 28 Sep 2015 21:39:00 -0000 [thread overview] Message-ID: <bug-66068-4-UjOMDC5ed0@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-66068-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66068 Jim Wilson <wilson at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wilson at gcc dot gnu.org --- Comment #6 from Jim Wilson <wilson at gcc dot gnu.org> --- The problem is in c_build_qualified_type. It calls build_qualified_type at the end which copies every field to create a new type, including TYPE_VFIELD. But this is wrong, as TYPE_VFIELD is set in the main variant type, but should not be set in the qualified type. To fix this, I would suggest storing the result of build_qualify_type in a local var, and then clearing C_TYPE_INCOMPLETE_VARS (aka TYPE_VFIELD) if this is a struct or union type. An alternative solution would be to clear TYPE_VFIELD somewhere lower down, such as in build_distinct_type_copy, but that would affect every front end, so it isn't obvious if this is safe. Fixing the problem in the C front end is clearly a safer solution.
next prev parent reply other threads:[~2015-09-28 21:39 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-05-08 7:41 [Bug c/66068] New: " dcb314 at hotmail dot com 2015-05-11 14:56 ` [Bug debug/66068] [6 Regression] " mpolacek at gcc dot gnu.org 2015-05-11 14:56 ` mpolacek at gcc dot gnu.org 2015-05-11 15:02 ` mpolacek at gcc dot gnu.org 2015-06-16 5:22 ` trippels at gcc dot gnu.org 2015-08-13 20:21 ` matt at use dot net 2015-09-28 21:39 ` wilson at gcc dot gnu.org [this message] 2015-09-28 23:05 ` pinskia at gcc dot gnu.org 2015-10-28 20:02 ` wilson at gcc dot gnu.org 2015-10-28 20:06 ` wilson at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-66068-4-UjOMDC5ed0@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).