diff mbox

[ARM,testsuite] fix pragma_cpp_fma testcase

Message ID CAKdteObJe3uLpAh92J_bG2mXAcBehybmkQwX+Mxifw0LmX5X4g@mail.gmail.com
State New
Headers show

Commit Message

Christophe Lyon March 6, 2016, 1:58 p.m. UTC
Hi,

In commit r233654, Christian introduced a new test: pragma_cpp_fma.

Unfortunately, this test fails when gcc is configured --with-fpu >=
neonvfpv4: __ARM_FEATURE_FMA is still defined after the last
pop_options.

To address this, I propose to simply force fpu=vfp via a pragma at the
beginning of the test, like we do in several other similar tests.

OK?

Christophe.
2016-03-07  Christophe Lyon  <christophe.lyon@linaro.org>

	* gcc.target/arm/pragma_cpp_fma.c: Reset default FPU.

Comments

Kyrill Tkachov March 7, 2016, 9:24 a.m. UTC | #1
On 06/03/16 13:58, Christophe Lyon wrote:
> Hi,
>
> In commit r233654, Christian introduced a new test: pragma_cpp_fma.
>
> Unfortunately, this test fails when gcc is configured --with-fpu >=
> neonvfpv4: __ARM_FEATURE_FMA is still defined after the last
> pop_options.
>
> To address this, I propose to simply force fpu=vfp via a pragma at the
> beginning of the test, like we do in several other similar tests.
>
> OK?

Ok.
Thanks,
Kyrill


>
> Christophe.
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.target/arm/pragma_cpp_fma.c b/gcc/testsuite/gcc.target/arm/pragma_cpp_fma.c
index be63256..c72ea8c 100644
--- a/gcc/testsuite/gcc.target/arm/pragma_cpp_fma.c
+++ b/gcc/testsuite/gcc.target/arm/pragma_cpp_fma.c
@@ -4,6 +4,9 @@ 
 /* { dg-require-effective-target arm_fp_ok } */
 /* { dg-add-options arm_fp } */
 
+/* Reset fpu to a value compatible with the next pragmas.  */
+#pragma GCC target ("fpu=vfp")
+
 #pragma GCC push_options
 #pragma GCC target ("fpu=crypto-neon-fp-armv8")