Fix neon test fails on non-neon configs.
authorams <ams@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Jan 2015 14:03:10 +0000 (14:03 +0000)
committerams <ams@138bc75d-0d04-0410-961f-82ee72b054a4>
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219602 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 3df2a2c..c630627 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 61bff53..2395ac4 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