arm: testsuite: improve compatibility of gcc.target/arm/macro_defs*.c

Convert these tests to use dg-add-options for increased compatibilty.
Since they also result in an empty translation unit, override the
default testsuite options.

gcc/testsuite:

	* gcc.target/arm/macro_defs0.c: Use dg-effective-target and
	dg-add-options.
	* gcc.target/arm/macro_defs1.c: Likewise.
	* gcc.target/arm/macro_defs2.c: Likewise.
This commit is contained in:
Richard Earnshaw 2023-11-06 15:26:20 +00:00
parent b9bed256c9
commit 5bc424925a
3 changed files with 7 additions and 12 deletions

View file

@ -1,8 +1,7 @@
/* { dg-do compile } */
/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-m" } } */
/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=soft" } } */
/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
/* { dg-options "-march=armv7-m -mcpu=cortex-m3 -mfloat-abi=soft -mthumb" } */
/* { dg-require-effective-target arm_arch_v7m_ok } */
/* { dg-options "" } */
/* { dg-add-options arm_arch_v7m } */
#ifdef __ARM_FP
#error __ARM_FP should not be defined

View file

@ -1,10 +1,8 @@
/* { dg-do compile } */
/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6-m" } } */
/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
/* { dg-require-effective-target arm_arch_v6m_ok } */
/* { dg-options "-march=armv6-m -mthumb" } */
/* { dg-options "" } */
/* { dg-add-options arm_arch_v6m } */
#ifdef __ARM_NEON_FP
#error __ARM_NEON_FP should not be defined
#endif

View file

@ -1,7 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-march=armv7ve -mcpu=cortex-a15 -mfpu=neon-vfpv4" } */
/* { dg-add-options arm_neon } */
/* { dg-require-effective-target arm_neon_ok } */
/* { dg-options "" } */
/* { dg-add-options arm_neon } */
#ifndef __ARM_NEON_FP
#error __ARM_NEON_FP is not defined but should be
@ -10,5 +10,3 @@
#ifndef __ARM_FP
#error __ARM_FP is not defined but should be
#endif