From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6072 invoked by alias); 24 Apr 2015 06:27:34 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 6020 invoked by uid 89); 24 Apr 2015 06:27:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 24 Apr 2015 06:27:32 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3O6RSJM031186 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 24 Apr 2015 02:27:28 -0400 Received: from host1.jankratochvil.net (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3O6ROO0004462 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 24 Apr 2015 02:27:27 -0400 Date: Fri, 24 Apr 2015 06:27:00 -0000 From: Jan Kratochvil To: Jeff Law Cc: gcc@gcc.gnu.org, Phil Muldoon , Tom Tromey , gdb@sourceware.org Subject: Re: [gcc libcc1] build_qualified_type for self-referencing/incomplete types Message-ID: <20150424062724.GA1890@host1.jankratochvil.net> References: <20150410123145.GA18073@host1.jankratochvil.net> <20150414060905.GA22747@host1.jankratochvil.net> <20150417152213.GA2589@host1.jankratochvil.net> <20150418101953.GA12295@host1.jankratochvil.net> <55396CF6.8020707@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55396CF6.8020707@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00050.txt.bz2 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