From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75400 invoked by alias); 30 Nov 2017 16:22:04 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 75388 invoked by uid 89); 30 Nov 2017 16:22:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,KB_WAM_FROM_NAME_SINGLEWORD,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:1186 X-HELO: gcc1-power7.osuosl.org Received: from gcc1-power7.osuosl.org (HELO gcc1-power7.osuosl.org) (140.211.15.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 Nov 2017 16:22:02 +0000 Received: by gcc1-power7.osuosl.org (Postfix, from userid 10019) id 232E612407DF; Thu, 30 Nov 2017 16:22:01 +0000 (UTC) From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Cc: dje.gcc@gmail.com, Segher Boessenkool Subject: [PATCH] rs6000: Set rs6000_cpu correctly (PR43871) Date: Thu, 30 Nov 2017 16:32:00 -0000 Message-Id: X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg02583.txt.bz2 We set rs6000_cpu based on tune_index, but it should be cpu_index. This patch fixes it. Tested on powerpc64-linux {-m32,-m64}. I'll commit this later today, and schedule backports for next week. Unless it is all terribly wrong and someone complains :-) Segher 2017-11-30 Segher Boessenkool PR target/43871 * config/rs6000/rs6000.c (rs6000_option_override_internal): Set rs6000_cpu based on cpu_index, not tune_index. --- gcc/config/rs6000/rs6000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 9929a45..9c0df9a 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -4183,8 +4183,8 @@ rs6000_option_override_internal (bool global_init_p) } } - gcc_assert (tune_index >= 0); - rs6000_cpu = processor_target_table[tune_index].processor; + gcc_assert (cpu_index >= 0); + rs6000_cpu = processor_target_table[cpu_index].processor; if (rs6000_cpu == PROCESSOR_PPCE300C2 || rs6000_cpu == PROCESSOR_PPCE300C3 || rs6000_cpu == PROCESSOR_PPCE500MC || rs6000_cpu == PROCESSOR_PPCE500MC64 -- 1.8.3.1