This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][arm] Fix gcc.target/arm/pr40887.c directives


Hi all,

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

Committing to trunk.

Thanks,
Kyrill

2018-01-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

    * gcc.target/arm/pr40887.c: Add armv5te effective target checks and
    directives.
diff --git a/gcc/testsuite/gcc.target/arm/pr40887.c b/gcc/testsuite/gcc.target/arm/pr40887.c
index 0329916d014c034fb37dbc62b6a2a99c32aa6510..5baa05695374a3746c2d08801da5d31c729def2a 100644
--- a/gcc/testsuite/gcc.target/arm/pr40887.c
+++ b/gcc/testsuite/gcc.target/arm/pr40887.c
@@ -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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]