From patchwork Thu Jun 10 12:57:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 55216 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 7C75BB7D5C for ; Thu, 10 Jun 2010 22:58:10 +1000 (EST) Received: (qmail 7759 invoked by alias); 10 Jun 2010 12:58:08 -0000 Received: (qmail 7735 invoked by uid 22791); 10 Jun 2010 12:58:07 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Jun 2010 12:58:02 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5ACvwKL005148 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 10 Jun 2010 08:58:00 -0400 Received: from adjoa.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5ACvu5p001019; Thu, 10 Jun 2010 08:57:57 -0400 From: Dodji Seketeli To: Jason Merrill Cc: gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Subject: Re: [RFC] PR c++/44188 References: <20100520110538.GR29186@redhat.com> <4BF575DA.8030108@redhat.com> <20100521121623.GU29186@redhat.com> <4BF6A896.3060703@redhat.com> <4BFBED4E.6030306@redhat.com> <4BFC92CD.9030702@redhat.com> <4BFD3CFA.8080908@redhat.com> <4BFD6192.2020807@redhat.com> <871vcg2f6w.fsf@firetop.home> X-URL: http://www.seketeli.org/dodji Date: Thu, 10 Jun 2010 14:57:56 +0200 In-Reply-To: <871vcg2f6w.fsf@firetop.home> (Richard Sandiford's message of "Wed, 09 Jun 2010 20:12:23 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Richard Sandiford writes: > This breaks builds of libstdc++-v3 on mipsisa64-elf, where > __builtin_va_list is a record type. We end up trying to output a > location for the definition of __builtin_va_list, which has location > UNKNOWN_LOCATION. We then segfault in lookup_filename because the > filename associated with UNKNOWN_LOCATION is null. > > Testcase is: > > typedef __builtin_va_list foo; > > compiled with "./cc1plus -g". > > A simple "fix" is attached, but many other built-in decls use > UNKNOWN_LOCATION, so I suspect something more fundamental is wrong. > Could you have a look? Sure. I am building a cross compiler right now, as I don't have access to this arch otherwise. It's taking time though. If you can do a quick test, does the (untested) patch below fix the issue for you? Thanks. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 6cbe8dc..e35a780 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -19891,6 +19891,7 @@ is_naming_typedef_decl (const_tree decl) if (decl == NULL_TREE || TREE_CODE (decl) != TYPE_DECL || !is_tagged_type (TREE_TYPE (decl)) + || DECL_IS_BUILTIN (decl) || is_redundant_typedef (decl) /* It looks like Ada produces TYPE_DECLs that are very similar to C++ naming typedefs but that have different