From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25522 invoked by alias); 9 Apr 2011 11:38:11 -0000 Received: (qmail 25511 invoked by uid 22791); 9 Apr 2011 11:38:09 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 09 Apr 2011 11:38:02 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 627C9CB0261 for ; Sat, 9 Apr 2011 13:38:01 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gkZdC7xjCN+b for ; Sat, 9 Apr 2011 13:37:58 +0200 (CEST) Received: from [192.168.1.2] (bon31-9-83-155-120-49.fbx.proxad.net [83.155.120.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 51C28CB023D for ; Sat, 9 Apr 2011 13:37:58 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [patch] Extend TYPE_DECL_IS_STUB trick in dwarf2out.c Date: Sat, 09 Apr 2011 11:38:00 -0000 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_iPEoNCUh61830Wg" Message-Id: <201104091332.50754.ebotcazou@adacore.com> Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg00683.txt.bz2 --Boundary-00=_iPEoNCUh61830Wg Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 346 As explained in http://gcc.gnu.org/ml/gcc/2011-04/msg00167.html, this patch extends the TYPE_DECL_IS_STUB trick in dwarf2out.c to all types. Tested on x86_64-suse-linux (GCC + GDB), OK for the mainline? 2011-04-09 Eric Botcazou * dwarf2out.c (TYPE_DECL_IS_STUB): Extend mechanism to all types. -- Eric Botcazou --Boundary-00=_iPEoNCUh61830Wg Content-Type: text/x-diff; charset="iso 8859-15"; name="p.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="p.diff" Content-length: 1444 Index: dwarf2out.c =================================================================== --- dwarf2out.c (revision 172201) +++ dwarf2out.c (working copy) @@ -6003,19 +6003,19 @@ skeleton_chain_node; #endif /* Define a macro which returns nonzero for a TYPE_DECL which was - implicitly generated for a tagged type. + implicitly generated for a type. - Note that unlike the gcc front end (which generates a NULL named - TYPE_DECL node for each complete tagged type, each array type, and - each function type node created) the g++ front end generates a - _named_ TYPE_DECL node for each tagged type node created. + Note that, unlike the C front-end (which generates a NULL named + TYPE_DECL node for each complete tagged type, each array type, + and each function type node created) the C++ front-end generates + a _named_ TYPE_DECL node for each tagged type node created. These TYPE_DECLs have DECL_ARTIFICIAL set, so we know not to - generate a DW_TAG_typedef DIE for them. */ + generate a DW_TAG_typedef DIE for them. Likewise with the Ada + front-end, but for each type, tagged or not. */ #define TYPE_DECL_IS_STUB(decl) \ (DECL_NAME (decl) == NULL_TREE \ || (DECL_ARTIFICIAL (decl) \ - && is_tagged_type (TREE_TYPE (decl)) \ && ((decl == TYPE_STUB_DECL (TREE_TYPE (decl))) \ /* This is necessary for stub decls that \ appear in nested inline functions. */ \ --Boundary-00=_iPEoNCUh61830Wg--