public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: Correctly update the isa and arch_test_option_p variables after the arch dependency handling code in mips.exp
@ 2015-07-10 15:37 Andrew Bennett
  2015-07-10 22:03 ` Matthew Fortune
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Bennett @ 2015-07-10 15:37 UTC (permalink / raw)
  To: gcc-patches
  Cc: Moore, Catherine (Catherine_Moore@mentor.com), Matthew Fortune

Hi,

I have noticed that in the mips.exp dg-option handling code the isa and 
arch_test_option_p variables are not updated after the pre-arch to arch 
dependency handling.  This means that if this code changes the 
architecture the post-arch dependency handling code (which relies on 
arch_test_option_p being true) is not run to handle any extra dependencies 
the new architecture might need.  

I have found this issue while investigating failures with the mips-mti-elf 
toolchain using the -mnan=legacy multilib flags when running any of the 
mips tests that have the HAS_LSA option specified in the dg-options.  The 
default architecture for this toolchain is mips32r2.  This means the architecture 
handling code changes the architecture to mips32r6 to handle the HAS_LSA 
requirements.  Unfortunately because the arch_test_option_p is not updated 
it is still set to false, so the post-arch code is not run.  This means
the nan encoding is not set to -mnan=2008 when then causes the tests to fail 
because mips32r6 does not support -mnan=legacy.	

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.target/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 } {
     }
 
     # 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]
 
     # Set an appropriate ABI, handling dependencies between the pre-abi
     # options and the abi options.  This should mirror the abi and post-abi

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-15  9:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-10 15:37 [PATCH] MIPS: Correctly update the isa and arch_test_option_p variables after the arch dependency handling code in mips.exp Andrew Bennett
2015-07-10 22:03 ` Matthew Fortune
2015-07-12 14:26   ` Richard Sandiford
2015-07-14 13:23     ` Andrew Bennett
2015-07-14 21:42       ` Moore, Catherine
2015-07-15  9:45         ` Andrew Bennett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).