diff mbox series

[arm] Fix gcc.target/arm/g2.c and scd42-2.c for --with-mode=thumb hardfloat targets

Message ID 5A5F9F82.8090805@foss.arm.com
State New
Headers show
Series [arm] Fix gcc.target/arm/g2.c and scd42-2.c for --with-mode=thumb hardfloat targets | expand

Commit Message

Kyrill Tkachov Jan. 17, 2018, 7:09 p.m. UTC
Hi all,

These -mcpu=xscale tests are ARM-only tests and they go to great pains to reject
explicit overriding options, but they're missing the -marm in their dg-options, which means
they will still give that nasty Thumb1 hard-float error when testing an implicit --with-mode=thumb
toolchain (--with-cpu=cortex-a15 --with-fpu=neon-vfpv4 --with-float=hard --with-mode=thumb, for example).

This patch adds the missing -marm and all is good again.

Committing to trunk.
Thanks,
Kyrill

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

     * gcc.target/arm/g2.c: Add -marm to dg-options.
     * gcc.target/arm/scd42-2.c: Likewise.
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/arm/g2.c b/gcc/testsuite/gcc.target/arm/g2.c
index 85ba1906a916882fb9e6e57a67cc6d96b6b8c4b3..e3680178df17a349fe06c7fed275b505e377e92d 100644
--- a/gcc/testsuite/gcc.target/arm/g2.c
+++ b/gcc/testsuite/gcc.target/arm/g2.c
@@ -1,6 +1,6 @@ 
 /* Verify that hardware multiply is preferred on XScale. */
 /* { dg-do compile } */
-/* { dg-options "-mcpu=xscale -O2" } */
+/* { dg-options "-mcpu=xscale -O2 -marm" } */
 /* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-march=*" } { "-march=xscale" } } */
 /* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-mcpu=*" } { "-mcpu=xscale" } } */
 /* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */
diff --git a/gcc/testsuite/gcc.target/arm/scd42-2.c b/gcc/testsuite/gcc.target/arm/scd42-2.c
index 8cd4bde475d65fd388c6f7b3ddb955339620b564..6d9e5e1fa39994d35f5e55bedbb04e22c975931f 100644
--- a/gcc/testsuite/gcc.target/arm/scd42-2.c
+++ b/gcc/testsuite/gcc.target/arm/scd42-2.c
@@ -4,7 +4,7 @@ 
 /* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-mcpu=*" } { "-mcpu=xscale" } } */
 /* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */
 /* { dg-require-effective-target arm32 } */
-/* { dg-options "-mcpu=xscale -O" } */
+/* { dg-options "-mcpu=xscale -O -marm" } */
 
 unsigned load2(void) __attribute__ ((naked));
 unsigned load2(void)