From patchwork Tue Jan 27 11:43:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tbsaunde+gcc@tbsaunde.org X-Patchwork-Id: 433326 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 65ECE1401AC for ; Tue, 27 Jan 2015 22:45:22 +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:from :to:cc:subject:date:message-id; q=dns; s=default; b=BPyD6nhuMDdQ RrGTJ9530xlUVT93MD21+pPy5Qcg7UL70hBx2HE71ySpBWbsYD37F/S0Br9cWMea kzeAGD59dl19mWUmTfoZU4Fp2b0g3N23ylfPk7vD6qDV4pHK7WDRjgJ61PKorg8O 4ldjrUnvdwM46hTrOopmOXYgzShSWVQ= 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:from :to:cc:subject:date:message-id; s=default; bh=0HHmFBGebmhsfFo/58 qoGEO/cos=; b=pKhevSsDBfH8eQRInipztFvJJaAN7RExS+kLia2kFGYbLdstUx pcLEIVSGu8UN47+y5JGW7ngNH/FnY4MegGi+XKR9tboYKMKUNyz7+vXhXx7sJ7pZ qL3IdkyRy5ruEUfWPuf4J87KmQJtlCAJGZBQ2i4N/7HZI1/3YNO7b9ck8= Received: (qmail 17762 invoked by alias); 27 Jan 2015 11:44:33 -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 13992 invoked by uid 89); 27 Jan 2015 11:44:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: paperclip.tbsaunde.org Received: from tbsaunde.org (HELO paperclip.tbsaunde.org) (66.228.47.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Jan 2015 11:44:11 +0000 Received: from iceball.corp.tor1.mozilla.com (unknown [23.233.68.71]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id 09C31C0BD; Tue, 27 Jan 2015 11:44:08 +0000 (UTC) From: tbsaunde+gcc@tbsaunde.org To: gcc-patches@gcc.gnu.org Cc: hubicka@ucw.cz, Trevor Saunders Subject: [PATCH] pr 64047 - explicitly handle target_option_default_node in rs6000_set_current_function Date: Tue, 27 Jan 2015 06:43:05 -0500 Message-Id: <1422358985-19630-1-git-send-email-tbsaunde+gcc@tbsaunde.org> X-IsSubscribed: yes From: Trevor Saunders Hi, the compiler crashes on pr52429.c because this_target_ira_int gets initialized with null x_init_costs and x_op_costs. While I don't really understand this option handling mess r217659 made the analogous change to i386 when it broke this. So it seems likely this is the right way to fix the regression. bootstrapped + regtested ppc64-linux-gnu, without regression and pr52429.c is fixed, ok? Trev gcc/ * config/rs6000/rs6000.c (rs6000_set_current_function): Handle explicit default options. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 85eb0fd..207fc55 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -32609,7 +32609,7 @@ rs6000_set_current_function (tree fndecl) if (old_tree == new_tree) ; - else if (new_tree) + else if (new_tree && new_tree != target_option_default_node) { cl_target_option_restore (&global_options, TREE_TARGET_OPTION (new_tree)); @@ -32620,7 +32620,7 @@ rs6000_set_current_function (tree fndecl) = save_target_globals_default_opts (); } - else if (old_tree) + else if (old_tree && old_tree != target_option_default_node) { new_tree = target_option_current_node; cl_target_option_restore (&global_options,