From patchwork Mon Nov 5 11:14:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 197187 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 EB8A22C007F for ; Mon, 5 Nov 2012 22:14:30 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1352718871; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To: MIME-Version:Content-Type:Content-Disposition:User-Agent: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=ui1ySxxxaddSaAurKaAg WsGt8oY=; b=iktdrLZ+eEVOyfa0OCfudZDqy5CcyaykXWQjuxhC6XEpSp88nV99 5nDqZia3kEIeAO58y4eFwhqfm6UA3GFuh5gu+4FbuTX+5NYrXNJoJKzMQCRay1sq ZCfQl76e07KvkA2PyNXjkXUMHwBDTPIA/UENHx2ncV67PX4ZDeJVyGo= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:MIME-Version:Content-Type:Content-Disposition:User-Agent:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=TW3+8kC2m2qRFwRurnsyjJ0GqTbFofk7tYIsIhVrkrDOVz9tUe9kYj6Fm3/f79 jzJ+DdXaHzWoV2u8KWce9tMnhCHDVeJcx0f62lPUuPmoXwPvw/XWqyWKoBqMjLGQ 0//M0pMWcfxDF1tUK8H6bJLTVby/KPbYWc0h7ZHuVGGi0=; Received: (qmail 24526 invoked by alias); 5 Nov 2012 11:14:26 -0000 Received: (qmail 24518 invoked by uid 22791); 5 Nov 2012 11:14:25 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_SPAMHAUS_DROP, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, RP_MATCHES_RCVD, SPF_HELO_PASS 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; Mon, 05 Nov 2012 11:14:19 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA5BEJjW030654 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 5 Nov 2012 06:14:19 -0500 Received: from zalov.redhat.com (vpn1-7-9.ams2.redhat.com [10.36.7.9]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qA5BEHiX023499 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Nov 2012 06:14:18 -0500 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.redhat.com (8.14.5/8.14.5) with ESMTP id qA5BEGKp026763; Mon, 5 Nov 2012 12:14:17 +0100 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id qA5BEGjd026762; Mon, 5 Nov 2012 12:14:16 +0100 Date: Mon, 5 Nov 2012 12:14:16 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Cc: Mark Wielaard Subject: [PATCH] Fix up value_format ICE for DWARF2_ADDR_SIZE < 4 targets (PR target/55194) Message-ID: <20121105111416.GI1881@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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 Hi! Apparently some targets have DWARF2_ADDR_SIZE < 4, for dw_val_class_addr when DW_FORM_addr can't be used value_format already handles DWARF2_ADDR_SIZE 1, 2, 4 and 8, so I've committed this change as obvious. 2012-11-05 Jakub Jelinek PR target/55194 * dwarf2out.c (value_format) : Handle also DWARF2_ADDR_SIZE 1 and 2. Jakub --- gcc/dwarf2out.c.jj 2012-10-26 21:03:45.000000000 +0200 +++ gcc/dwarf2out.c 2012-11-05 12:04:31.832255264 +0100 @@ -7597,12 +7597,16 @@ value_format (dw_attr_ref a) case dw_val_class_high_pc: switch (DWARF2_ADDR_SIZE) { - case 4: - return DW_FORM_data4; - case 8: - return DW_FORM_data8; - default: - gcc_unreachable (); + case 1: + return DW_FORM_data1; + case 2: + return DW_FORM_data2; + case 4: + return DW_FORM_data4; + case 8: + return DW_FORM_data8; + default: + gcc_unreachable (); } default: