From patchwork Thu Nov 29 12:12:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Tietz X-Patchwork-Id: 202727 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 94B942C008E for ; Thu, 29 Nov 2012 23:12:31 +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=1354795953; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=bTfwtGF q1Uo3fBUEp8l+7j5RftM=; b=pUXMFzewM9YLOT2V0P8fl/nH3HMVwv6bDsPvU13 hndRvSYBrhlBMH4gVyeeXlOQriWxs7+gv5O7Y45vKT+Hs9MFnTZxJ/nabwoW3Yt1 DvsrTPXjrgEd5SzGbNDJGuc/SP8LTaV8l59KWM+RKcz9inZ/57hxcDHNaHXl/vsf rsJg= 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:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=wMszbORP3uPU9U8eHbeSJyzgfB/HtwI9j/+ML0gGPDiFdOn1UXBrMYgnloJ9CK hYkA0hl9w6fFsYSlCaqpnP2Pd/JSgMVPk1r4nRWfuqFb/ju1l8gAjx/NHiP3Bc1o r1MDlZyle0jgiuOrSc3d6uzS+GMsyTREpPfNLDS9J7aMw=; Received: (qmail 32212 invoked by alias); 29 Nov 2012 12:12:25 -0000 Received: (qmail 31710 invoked by uid 22791); 29 Nov 2012 12:12:22 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL, BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, KHOP_RCVD_TRUST, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wg0-f51.google.com (HELO mail-wg0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Nov 2012 12:12:16 +0000 Received: by mail-wg0-f51.google.com with SMTP id ei8so5349442wgb.8 for ; Thu, 29 Nov 2012 04:12:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.51.21 with SMTP id a21mr8026956wec.176.1354191135050; Thu, 29 Nov 2012 04:12:15 -0800 (PST) Received: by 10.216.153.132 with HTTP; Thu, 29 Nov 2012 04:12:14 -0800 (PST) Date: Thu, 29 Nov 2012 13:12:14 +0100 Message-ID: Subject: [patch stmt.c]: 6 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32 From: Kai Tietz To: GCC Patches 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 Hello, this trivial patch fixes a bootstrap issue on LLP64 hosts. ChangeLog 2012-11-29 Kai Tietz PR target/53912 * stmt.c (compute_cases_per_edge): Cast from pointer via intptr_t. (expand_case): Likewise. Tested for i686-w64-mingw32, x86_64-w64-mingw32, and x86_64-unknown-gnu-linux. Ok for apply? Regards, Kai Index: stmt.c =================================================================== --- stmt.c (Revision 193925) +++ stmt.c (Arbeitskopie) @@ -2061,7 +2061,7 @@ compute_cases_per_edge (gimple stmt) tree lab = CASE_LABEL (elt); basic_block case_bb = label_to_block_fn (cfun, lab); edge case_edge = find_edge (bb, case_bb); - case_edge->aux = (void *)((long)(case_edge->aux) + 1); + case_edge->aux = (void *)((intptr_t)(case_edge->aux) + 1); } } @@ -2176,7 +2176,7 @@ expand_case (gimple stmt) edge case_edge = find_edge (bb, case_bb); case_list = add_case_node ( case_list, low, high, lab, - case_edge->probability / (long)(case_edge->aux), + case_edge->probability / (intptr_t)(case_edge->aux), case_node_pool); } pointer_set_destroy (seen_labels);