public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Jeff Law <law@redhat.com>
Cc: gcc@gcc.gnu.org, Phil Muldoon <pmuldoon@redhat.com>,
	       Tom Tromey <tom@tromey.com>,
	gdb@sourceware.org
Subject: Re: [gcc libcc1] build_qualified_type for self-referencing/incomplete types
Date: Fri, 24 Apr 2015 06:27:00 -0000	[thread overview]
Message-ID: <20150424062724.GA1890@host1.jankratochvil.net> (raw)
In-Reply-To: <55396CF6.8020707@redhat.com>

On Fri, 24 Apr 2015 00:06:46 +0200, Jeff Law wrote:
> On 04/18/2015 04:19 AM, Jan Kratochvil wrote:
> > Instead of current:
> > 	plugin_build_record_type:
> > 		record_type = make_node (RECORD_TYPE)
> > 	plugin_build_add_field:
> > 		add fields to record_type... But there is no qualified_record_type here!
> > 	plugin_finish_record_or_union:
> > 		TYPE_SIZE (record_type) etc. ... to finish the type
> > 	plugin_build_qualified_type:
> > 		qualified_record_type = build_qualified_type (record_type, ...)
[...]
> I'm a bit surprised the former didn't work,

build_qualified_type() will make a copy of the type being created.  While the
original type gets finished later (added more fields and its final TYPE_SIZE)
the copy remains unfinished forever and GCC later crashes trying to access the
unfinished copy.


> but if the latter is working consistently, then I'd stick with it.

Yes, it is solved now.


Jan

      reply	other threads:[~2015-04-24  6:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10 12:31 Jan Kratochvil
2015-04-14  6:09 ` Jan Kratochvil
2015-04-17 15:22   ` Jan Kratochvil
2015-04-18 10:20     ` Jan Kratochvil
2015-04-23 22:06       ` Jeff Law
2015-04-24  6:27         ` Jan Kratochvil [this message]

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=20150424062724.GA1890@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=gdb@sourceware.org \
    --cc=law@redhat.com \
    --cc=pmuldoon@redhat.com \
    --cc=tom@tromey.com \
    /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: link
Be 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).