From patchwork Tue Aug 31 07:03:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 63201 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 EA28CB7107 for ; Tue, 31 Aug 2010 17:04:04 +1000 (EST) Received: (qmail 14277 invoked by alias); 31 Aug 2010 07:04:01 -0000 Received: (qmail 14126 invoked by uid 22791); 31 Aug 2010 07:04:00 -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) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Aug 2010 07:03:55 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 010B3CB0264 for ; Tue, 31 Aug 2010 09:03:53 +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 F4kd14ybX5VF for ; Tue, 31 Aug 2010 09:03:52 +0200 (CEST) Received: from new-host-2.home (ADijon-552-1-123-239.w92-148.abo.wanadoo.fr [92.148.186.239]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id CDD71CB01BA for ; Tue, 31 Aug 2010 09:03:52 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: Generate DW_TAG_constant in Ada Date: Tue, 31 Aug 2010 09:03:54 +0200 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Message-Id: <201008310903.54844.ebotcazou@adacore.com> 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 Ada has true named constants so DW_TAG_constant is needed for them. Tested on x86-64-suse-linux, applied on the mainline as obvious. 2010-08-31 Eric Botcazou * dwarf2out.c (gen_decl_die) : Do not skip in Ada. (dwarf2out_decl) : Likewise. Index: dwarf2out.c =================================================================== --- dwarf2out.c (revision 163659) +++ dwarf2out.c (working copy) @@ -20477,7 +20477,7 @@ gen_decl_die (tree decl, tree origin, dw break; case CONST_DECL: - if (!is_fortran ()) + if (!is_fortran () && !is_ada ()) { /* The individual enumerators of an enum type get output when we output the Dwarf representation of the relevant enum type itself. */ @@ -20888,7 +20888,7 @@ dwarf2out_decl (tree decl) case CONST_DECL: if (debug_info_level <= DINFO_LEVEL_TERSE) return; - if (!is_fortran ()) + if (!is_fortran () && !is_ada ()) return; if (TREE_STATIC (decl) && decl_function_context (decl)) context_die = lookup_decl_die (DECL_CONTEXT (decl));