From patchwork Thu Apr 18 13:49:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chung-Lin Tang X-Patchwork-Id: 237644 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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 3534B2C0199 for ; Thu, 18 Apr 2013 23:50:35 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=mLpuxsVgYnCWZfamBZ9l7cHa/AilSXso+ivOTxxYFJh m9uhbLjexdGjYitxFAuaqev7ZD6HYQhY+siIARfSr8ijyzJ4KOkLm6Nimp2khuV+ 6L8zw5ehPGr4t6GceCpAQDUkLN/+1j8cx+2FMN88k5/u9M2CKwNUp6HvCUThvKbw = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=6SuPizw7ch+rNHV4poAYQD/kbAw=; b=SQtwzo4D6GqmWT3ZU 2TCg6n88lsn6GVVwCGhs3hHk0eu2YTOrXRZqMhCA47nGPUrA3Vc18Cl6JqUhXXHN /td7H/B8VTk40A/aD48Rlx4lby2LS7WKPCTADkTpgKi2wJS/RY8VYe+J3uPyzr9T y7MCvGbPQZP2dBPdQszC5/CUfU= Received: (qmail 32597 invoked by alias); 18 Apr 2013 13:49:51 -0000 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 Received: (qmail 32573 invoked by uid 89); 18 Apr 2013 13:49:51 -0000 X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 18 Apr 2013 13:49:50 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1USpDg-0003y4-TK from ChungLin_Tang@mentor.com for gcc-patches@gcc.gnu.org; Thu, 18 Apr 2013 06:49:48 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 18 Apr 2013 06:49:48 -0700 Received: from [0.0.0.0] (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.2.247.3; Thu, 18 Apr 2013 06:49:48 -0700 Message-ID: <516FF9F4.10501@codesourcery.com> Date: Thu, 18 Apr 2013 21:49:40 +0800 From: Chung-Lin Tang User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: gcc-patches CC: Sandra Loosemore , Julian Brown Subject: [PATCH 4/5] Altera Nios II: dwarf generation fix X-Virus-Found: No This patch was a fix by Julian which corrected a HOST_BITS_PER_WIDE_INT host dependency in dwarf generation. Nios II does not have need_64bit_hwint switched on during configuring, and ran into GDB test FAILs originating from this problem. 2013-04-18 Julian Brown * dwarf2out.c (gen_enumeration_type_die): Fix HOST_BITS_PER_WIDE_INT dependency behavior in enumeration type DIE generation. Index: gcc/dwarf2out.c =================================================================== --- gcc/dwarf2out.c (revision 407083) +++ gcc/dwarf2out.c (revision 409063) @@ -17025,15 +17025,21 @@ if (TREE_CODE (value) == CONST_DECL) value = DECL_INITIAL (value); - if (host_integerp (value, TYPE_UNSIGNED (TREE_TYPE (value)))) + if (host_integerp (value, TYPE_UNSIGNED (TREE_TYPE (value))) + && (simple_type_size_in_bits (TREE_TYPE (value)) + <= HOST_BITS_PER_WIDE_INT || host_integerp (value, 0))) /* DWARF2 does not provide a way of indicating whether or not enumeration constants are signed or unsigned. GDB always assumes the values are signed, so we output all values as if they were signed. That means that enumeration constants with very large unsigned values will appear to have negative values in the debugger. */ - add_AT_int (enum_die, DW_AT_const_value, - tree_low_cst (value, tree_int_cst_sgn (value) > 0)); + add_AT_int (enum_die, DW_AT_const_value, TREE_INT_CST_LOW (value)); + else + /* Enumeration constants may be wider than HOST_WIDE_INT. Handle + that here. */ + add_AT_double (enum_die, DW_AT_const_value, + TREE_INT_CST_HIGH (value), TREE_INT_CST_LOW (value)); } add_gnat_descriptive_type_attribute (type_die, type, context_die);