Running an arm-none-eabi test that adds "-mthumb" for a multilib that
uses "-march=armv5te -mfloat-abi=hard" works fine if the test doesn't
have any calls, but if it does then the effective-target checks for
arm_thumb1_ok and arm_thumb2_ok pass but the test's compile step fails
with "sorry, unimplemented: Thumb-1 hard-float VFP ABI".

This patch adds code to those effective-target checks to exercise
argument handling and causes them to fail for the multilib flags
listed above.  Tested by running gcc.target/arm tests with a variety
of multilib flags.  OK for mainline and the 4.9 branch?

Janis
2014-08-07  Janis Johnson  <jani...@codesourcery.com>

        * lib/target-supports.exp (check_effective_target_arm_thumb1_ok,
        check_effective_target_arm_thumb2_ok): Test with code that passes
        an argument and returns a result.

Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp       (revision 213683)
+++ gcc/testsuite/lib/target-supports.exp       (working copy)
@@ -2761,6 +2761,7 @@
        #if !defined(__arm__) || !defined(__thumb__) || defined(__thumb2__)
        #error FOO
        #endif
+       int foo (int i) { return i; }
     } "-mthumb"]
 }
 
@@ -2772,6 +2773,7 @@
        #if !defined(__thumb2__)
        #error FOO
        #endif
+       int foo (int i) { return i; }
     } "-mthumb"]
 }
 

Reply via email to