From patchwork Fri Dec 5 22:44:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 418313 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 343A714011D for ; Sat, 6 Dec 2014 09:45:09 +1100 (AEDT) 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:subject:content-type; q= dns; s=default; b=weDYnzvTnJHO0sG5JDFRQjXwPHFrTAhn4fgtnj/Vln/dn+ +WMdPEp4k0Ri9JetIXXl13mnQzjAIiu+5+TfE2+Q5BIFMY+AaU1MQdXseug79Ayh qjYikPizfM+7KARTcGtdOHZKckYTpIf0nq5Vpzh+avGfeVZfdtWHuSkJaX3AQ= 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:subject:content-type; s= default; bh=945onsBWqzDAppQT2+n0Qz5jVC4=; b=hukMky7j5JHo/ALlEchT lYgS1FxKAuoT5A9o5UnulV9+foD4eSNVCrAa/+N3Q/vzvl9+E+TlZct6C+WCSO4a h1reL4GK/RaKFVXs1Ig2G12zkO76T/9TfVuzRAoGehATKbDRcvKLMiGenGBYWAoP 2+2VXjpDuHhpW/y3XvlRCBA= Received: (qmail 3067 invoked by alias); 5 Dec 2014 22:45:03 -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 3045 invoked by uid 89); 5 Dec 2014 22:45:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 05 Dec 2014 22:45:01 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sB5Mj0j6003622 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 5 Dec 2014 17:45:00 -0500 Received: from VMBP.local (vpn-57-194.rdu2.redhat.com [10.10.57.194]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sB5MixBF017201 for ; Fri, 5 Dec 2014 17:45:00 -0500 Message-ID: <5482356B.4070400@redhat.com> Date: Fri, 05 Dec 2014 17:44:59 -0500 From: Vladimir Makarov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: GCC Patches Subject: RFA: patch to fix PR64157 X-IsSubscribed: yes The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64157 After calling target_reinit from save_target_globals for switchable targets (as ppc), a lot of ira data (register sets, classes etc) become undefined. After that ira-costs.c crashes when the undefined data are used. The patch was successfully bootstrapped and tested on x86-64. Ok to commit to the trunk? 2014-12-05 Vladimir Makarov PR rtl-optimization/64157 * toplev.c (target_reinit): Call ira_init. Index: toplev.c =================================================================== --- toplev.c (revision 218378) +++ toplev.c (working copy) @@ -1888,6 +1888,8 @@ target_reinit (void) /* This invokes target hooks to set fixed_reg[] etc, which is mode-dependent. */ init_regs (); + /* Set IRA data depended on target parameters. */ + ira_init (); /* Reinitialize lang-dependent parts. */ lang_dependent_init_target ();