Fix neon test fails on non-neon configs.
authorAndrew Stubbs <ams@codesourcery.com>
Wed, 14 Jan 2015 14:03:10 +0000 (14:03 +0000)
committerAndrew Stubbs <ams@gcc.gnu.org>
Wed, 14 Jan 2015 14:03:10 +0000 (14:03 +0000)
gcc/testsuite/
* lib/target-supports.exp
(check_effective_target_arm_neon_ok_nocache): Don't try to test Neon
on ARM architures before v7.

From-SVN: r219602

gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index 3df2a2c7185fea434d543069d4833e82645315d1..c630627d43cc340c81d07bc7d0af1a7fb5f6be6b 100644 (file)
@@ -1,3 +1,9 @@
+2015-01-14  Andrew Stubbs  <ams@codesourcery.com>
+
+       * lib/target-supports.exp
+       (check_effective_target_arm_neon_ok_nocache): Don't try to test Neon
+       on ARM architures before v7.
+
 2015-01-14  Andrew MacLeod  <amacleod@redhat.com>
 
        PR middle-end/59448
index 61bff53754b5b969318f5ff8a366069c7af6ddf3..2395ac4250f0b0ef8084ac1c4b2dcc2daf16e6f3 100644 (file)
@@ -2592,6 +2592,11 @@ proc check_effective_target_arm_neon_ok_nocache { } {
            if { [check_no_compiler_messages_nocache arm_neon_ok object {
                #include "arm_neon.h"
                int dummy;
+               /* Avoid the case where a test adds -mfpu=neon, but the toolchain is
+                  configured for -mcpu=arm926ej-s, for example.  */
+               #if __ARM_ARCH < 7
+               #error Architecture too old for NEON.
+               #endif
            } "$flags"] } {
                set et_arm_neon_flags $flags
                return 1