diff mbox series

[arm] Fix gcc.target/arm/xor-and.c

Message ID 5A5F2F51.2030204@foss.arm.com
State New
Headers show
Series [arm] Fix gcc.target/arm/xor-and.c | expand

Commit Message

Kyrill Tkachov Jan. 17, 2018, 11:11 a.m. UTC
Hi all,

This test is naughty because it doesn't use the proper effective target checks
and add-options mechanisms for setting a Thumb1 target, which leads to Thumb1 hard-float errors
when testing a toolchain configured with --with-cpu=cortex-a15 --with-fpu=neon-vfpv4 --with-float=hard --with-mode=thumb.

This patch fixes that in the obvious way.

Committing to trunk.
Thanks,
Kyrill

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

     * gcc.target/arm/xor-and.c: Fix armv6 effective target checks
     and options.

Comments

Christophe Lyon Jan. 18, 2018, 1:06 p.m. UTC | #1
On 17 January 2018 at 12:11, Kyrill  Tkachov
<kyrylo.tkachov@foss.arm.com> wrote:
> Hi all,
>
> This test is naughty because it doesn't use the proper effective target
> checks
> and add-options mechanisms for setting a Thumb1 target, which leads to
> Thumb1 hard-float errors
> when testing a toolchain configured with --with-cpu=cortex-a15
> --with-fpu=neon-vfpv4 --with-float=hard --with-mode=thumb.
>
> This patch fixes that in the obvious way.
>
> Committing to trunk.
> Thanks,
> Kyrill
>
> 2018-01-17  Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
>     * gcc.target/arm/xor-and.c: Fix armv6 effective target checks
>     and options.

There was a problem with the order of dg-options and dg-add-options,
which I fixed as a obvious at r256845.

Christophe
2018-01-18  Christophe Lyon  <christophe.lyon@linaro.org>

	* gcc.target/arm/xor-and.c: Fix dg-options and dg-add-options
	order.
Index: gcc/testsuite/gcc.target/arm/xor-and.c
===================================================================
--- gcc/testsuite/gcc.target/arm/xor-and.c	(revision 256844)
+++ gcc/testsuite/gcc.target/arm/xor-and.c	(revision 256845)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_arch_v6_ok } */
+/* { dg-options "-O" }  */
 /* { dg-add-options arm_arch_v6 } */
-/* { dg-options "-O" }  */
 
 unsigned short foo (unsigned short x)
 {
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/arm/xor-and.c b/gcc/testsuite/gcc.target/arm/xor-and.c
index 3715530cd7bf9ad8abb24cb21cd51ae3802079e8..9afa81d3ec10c983ba2555c867f6f00a85f80150 100644
--- a/gcc/testsuite/gcc.target/arm/xor-and.c
+++ b/gcc/testsuite/gcc.target/arm/xor-and.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O -march=armv6" } */
-/* { dg-prune-output "switch .* conflicts with" } */
+/* { dg-require-effective-target arm_arch_v6_ok } */
+/* { dg-add-options arm_arch_v6 } */
+/* { dg-options "-O" }  */
 
 unsigned short foo (unsigned short x)
 {