From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109645 invoked by alias); 10 Jul 2015 15:37:12 -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 109626 invoked by uid 89); 10 Jul 2015 15:37:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 Jul 2015 15:37:10 +0000 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 54FBAD76B9629; Fri, 10 Jul 2015 16:37:04 +0100 (IST) Received: from LEMAIL01.le.imgtec.org (192.168.152.62) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 10 Jul 2015 16:37:06 +0100 Received: from LEMAIL01.le.imgtec.org ([fe80::5ae:ee16:f4b9:cda9]) by LEMAIL01.le.imgtec.org ([fe80::5ae:ee16:f4b9:cda9%17]) with mapi id 14.03.0210.002; Fri, 10 Jul 2015 16:37:06 +0100 From: Andrew Bennett To: "gcc-patches@gcc.gnu.org" CC: "Moore, Catherine (Catherine_Moore@mentor.com)" , Matthew Fortune Subject: [PATCH] MIPS: Correctly update the isa and arch_test_option_p variables after the arch dependency handling code in mips.exp Date: Fri, 10 Jul 2015 15:37:00 -0000 Message-ID: <0DA23CC379F5F945ACB41CF394B98277210F39A7@LEMAIL01.le.imgtec.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00900.txt.bz2 Hi, I have noticed that in the mips.exp dg-option handling code the isa and=20 arch_test_option_p variables are not updated after the pre-arch to arch=20 dependency handling. This means that if this code changes the=20 architecture the post-arch dependency handling code (which relies on=20 arch_test_option_p being true) is not run to handle any extra dependencies= =20 the new architecture might need.=20=20 I have found this issue while investigating failures with the mips-mti-elf= =20 toolchain using the -mnan=3Dlegacy multilib flags when running any of the=20 mips tests that have the HAS_LSA option specified in the dg-options. The=20 default architecture for this toolchain is mips32r2. This means the archit= ecture=20 handling code changes the architecture to mips32r6 to handle the HAS_LSA=20 requirements. Unfortunately because the arch_test_option_p is not updated= =20 it is still set to false, so the post-arch code is not run. This means the nan encoding is not set to -mnan=3D2008 when then causes the tests to f= ail=20 because mips32r6 does not support -mnan=3Dlegacy.=09 The patch and ChangeLog are below. Ok to commit? Regards, Andrew testsuite/ * gcc.target/mips/mips.exp (mips-dg-options): Update the isa and arch_test_option_p variables after the arch dependency handling code. diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.tar= get/mips/mips.exp index 1dd4173..1eb714d 100644 --- a/gcc/testsuite/gcc.target/mips/mips.exp +++ b/gcc/testsuite/gcc.target/mips/mips.exp @@ -1188,8 +1188,10 @@ proc mips-dg-options { args } { } =20 # Re-calculate the isa_rev for use in the abi handling code below + set arch_test_option_p [mips_test_option_p options arch] set arch [mips_option options arch] set isa_rev [mips_arch_info $arch isa_rev] + set isa [mips_arch_info $arch isa] =20 # Set an appropriate ABI, handling dependencies between the pre-abi # options and the abi options. This should mirror the abi and post-abi