[arm] Fix gcc.target/arm/pr40887.c directives
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Wed, 17 Jan 2018 11:24:52 +0000 (11:24 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Wed, 17 Jan 2018 11:24:52 +0000 (11:24 +0000)
This patch converts gcc.target/arm/pr40887.c to use the proper effective target check and dg-add-options for armv5te
so that we avoid situations where we end up trying to compile the test with a Thumb1 hard-float ABI, which makes the
compiler complain.

This allows the test to pass gracefully for me for my compiler configured with:
--with-cpu=cortex-a15 --with-fpu=neon-vfpv4 --with-float=hard --with-mode=thumb

     * gcc.target/arm/pr40887.c: Add armv5te effective target checks and
     directives.

From-SVN: r256784

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/pr40887.c

index 807752e25fe554f63fa3a4503c246264ce1d78ae..43d1a90bf90f4f73eea099f5a9738dfa00af1b6d 100644 (file)
@@ -1,10 +1,15 @@
+2018-01-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       * gcc.target/arm/pr40887.c: Add armv5te effective target checks and
+       directives.
+
 2018-01-17  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/83843
        * gcc.dg/store_merging_18.c: Don't expect "Merging successful" on arm.
        * gcc.dg/store_merging_19.c: New test.
 
-2018-01-17  Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+2018-01-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        * gcc.target/arm/xor-and.c: Fix armv6 effective target checks
        and options.
index 5cabe3ab7feaa2563702adb494bcfbeeff956053..5343a7b54a4ee7958851c62ee61fba8b3b21c86a 100644 (file)
@@ -1,5 +1,8 @@
+/* { dg-do compile } */
 /* { dg-skip-if "need at least armv5" { *-*-* } { "-march=armv[234]*" } { "" } } */
-/* { dg-options "-O2 -march=armv5te" }  */
+/* { dg-require-effective-target arm_arch_v5te_ok } */
+/* { dg-add-options arm_arch_v5te } */
+/* { dg-options "-O2" }  */
 /* { dg-final { scan-assembler "blx" } } */
 
 int (*indirect_func)(int x);