Some of the tests in the gcc.target/arm/cmse directory (eg.
gcc.target/arm/cmse/mainline/bitfield-4.c) are failing when run without
an architecture specified in RUNTESTFLAGS due to them not adding the
option to select an Armv8-M architecture.
This patch fixes the issue by adding the right option from the exp file
so that no architecture fiddling is necessary in the individual tests.
2017-11-17 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/testsuite/
* gcc.target/arm/cmse/cmse.exp: Add option to select Armv8-M Baseline
or Armv8-M Mainline when running the respective tests.
* gcc.target/arm/cmse/baseline/cmse-11.c: Remove architecture check and
selection.
* gcc.target/arm/cmse/baseline/cmse-13.c: Likewise.
* gcc.target/arm/cmse/baseline/cmse-2.c: Likewise.
* gcc.target/arm/cmse/baseline/cmse-6.c: Likewise.
* gcc.target/arm/cmse/baseline/softfp.c: Likewise.
* gcc.target/arm/cmse/mainline/hard-sp/cmse-13.c: Likewise.
* gcc.target/arm/cmse/mainline/hard-sp/cmse-5.c: Likewise.
* gcc.target/arm/cmse/mainline/hard-sp/cmse-7.c: Likewise.
* gcc.target/arm/cmse/mainline/hard-sp/cmse-8.c: Likewise.
* gcc.target/arm/cmse/mainline/hard/cmse-13.c: Likewise.
* gcc.target/arm/cmse/mainline/hard/cmse-5.c: Likewise.
* gcc.target/arm/cmse/mainline/hard/cmse-7.c: Likewise.
* gcc.target/arm/cmse/mainline/hard/cmse-8.c: Likewise.
* gcc.target/arm/cmse/mainline/soft/cmse-13.c: Likewise.
* gcc.target/arm/cmse/mainline/soft/cmse-5.c: Likewise.
* gcc.target/arm/cmse/mainline/soft/cmse-7.c: Likewise.
* gcc.target/arm/cmse/mainline/soft/cmse-8.c: Likewise.
* gcc.target/arm/cmse/mainline/softfp-sp/cmse-5.c: Likewise.
* gcc.target/arm/cmse/mainline/softfp-sp/cmse-7.c: Likewise.
* gcc.target/arm/cmse/mainline/softfp-sp/cmse-8.c: Likewise.
* gcc.target/arm/cmse/mainline/softfp/cmse-13.c: Likewise.
* gcc.target/arm/cmse/mainline/softfp/cmse-5.c: Likewise.
* gcc.target/arm/cmse/mainline/softfp/cmse-7.c: Likewise.
* gcc.target/arm/cmse/mainline/softfp/cmse-8.c: Likewise.
From-SVN: r254860
+2017-11-17 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * gcc.target/arm/cmse/cmse.exp: Add option to select Armv8-M Baseline
+ or Armv8-M Mainline when running the respective tests.
+ * gcc.target/arm/cmse/baseline/cmse-11.c: Remove architecture check and
+ selection.
+ * gcc.target/arm/cmse/baseline/cmse-13.c: Likewise.
+ * gcc.target/arm/cmse/baseline/cmse-2.c: Likewise.
+ * gcc.target/arm/cmse/baseline/cmse-6.c: Likewise.
+ * gcc.target/arm/cmse/baseline/softfp.c: Likewise.
+ * gcc.target/arm/cmse/mainline/hard-sp/cmse-13.c: Likewise.
+ * gcc.target/arm/cmse/mainline/hard-sp/cmse-5.c: Likewise.
+ * gcc.target/arm/cmse/mainline/hard-sp/cmse-7.c: Likewise.
+ * gcc.target/arm/cmse/mainline/hard-sp/cmse-8.c: Likewise.
+ * gcc.target/arm/cmse/mainline/hard/cmse-13.c: Likewise.
+ * gcc.target/arm/cmse/mainline/hard/cmse-5.c: Likewise.
+ * gcc.target/arm/cmse/mainline/hard/cmse-7.c: Likewise.
+ * gcc.target/arm/cmse/mainline/hard/cmse-8.c: Likewise.
+ * gcc.target/arm/cmse/mainline/soft/cmse-13.c: Likewise.
+ * gcc.target/arm/cmse/mainline/soft/cmse-5.c: Likewise.
+ * gcc.target/arm/cmse/mainline/soft/cmse-7.c: Likewise.
+ * gcc.target/arm/cmse/mainline/soft/cmse-8.c: Likewise.
+ * gcc.target/arm/cmse/mainline/softfp-sp/cmse-5.c: Likewise.
+ * gcc.target/arm/cmse/mainline/softfp-sp/cmse-7.c: Likewise.
+ * gcc.target/arm/cmse/mainline/softfp-sp/cmse-8.c: Likewise.
+ * gcc.target/arm/cmse/mainline/softfp/cmse-13.c: Likewise.
+ * gcc.target/arm/cmse/mainline/softfp/cmse-5.c: Likewise.
+ * gcc.target/arm/cmse/mainline/softfp/cmse-7.c: Likewise.
+ * gcc.target/arm/cmse/mainline/softfp/cmse-8.c: Likewise.
+
2017-11-17 Jakub Jelinek <jakub@redhat.com>
PR testsuite/82997
/* { dg-do compile } */
/* { dg-options "-mcmse" } */
-/* { dg-require-effective-target arm_arch_v8m_base_ok } */
-/* { dg-add-options arm_arch_v8m_base } */
int __attribute__ ((cmse_nonsecure_call)) (*bar) (int);
/* { dg-do compile } */
/* { dg-options "-mcmse" } */
-/* { dg-require-effective-target arm_arch_v8m_base_ok } */
-/* { dg-add-options arm_arch_v8m_base } */
#include "../cmse-13.x"
/* { dg-do compile } */
/* { dg-options "-mcmse" } */
-/* { dg-require-effective-target arm_arch_v8m_base_ok } */
-/* { dg-add-options arm_arch_v8m_base } */
extern float bar (void);
/* { dg-do compile } */
/* { dg-options "-mcmse" } */
-/* { dg-require-effective-target arm_arch_v8m_base_ok } */
-/* { dg-add-options arm_arch_v8m_base } */
int __attribute__ ((cmse_nonsecure_call)) (*bar) (double);
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=softfp" } */
-/* { dg-require-effective-target arm_arch_v8m_base_ok } */
-/* { dg-add-options arm_arch_v8m_base } */
double __attribute__ ((cmse_nonsecure_call)) (*bar) (float, double);
if {[check_effective_target_arm_arch_v8m_base_ok]} then {
# Baseline only
+ set BASELINE_FLAGS [add_options_for_arm_arch_v8m_base ""]
gcc-dg-runtest [lsort [glob $srcdir/$subdir/baseline/*.c]] \
- "" $DEFAULT_CFLAGS
+ "$BASELINE_FLAGS" $DEFAULT_CFLAGS
}
if {[check_effective_target_arm_arch_v8m_main_ok]} then {
+ set MAINLINE_FLAGS [add_options_for_arm_arch_v8m_main ""]
gcc-dg-runtest [lsort [glob $srcdir/$subdir/mainline/*.c]] \
- "" $DEFAULT_CFLAGS
+ "$MAINLINE_FLAGS" $DEFAULT_CFLAGS
# Mainline -mfloat-abi=soft
gcc-dg-runtest [lsort [glob $srcdir/$subdir/mainline/soft/*.c]] \
- "-mfloat-abi=soft" $DEFAULT_CFLAGS
+ "$MAINLINE_FLAGS -mfloat-abi=soft" $DEFAULT_CFLAGS
gcc-dg-runtest [lsort [glob $srcdir/$subdir/mainline/softfp/*.c]] \
- "" $DEFAULT_CFLAGS
+ "$MAINLINE_FLAGS" $DEFAULT_CFLAGS
gcc-dg-runtest [lsort [glob $srcdir/$subdir/mainline/softfp-sp/*.c]] \
- "" $DEFAULT_CFLAGS
+ "$MAINLINE_FLAGS" $DEFAULT_CFLAGS
gcc-dg-runtest [lsort [glob $srcdir/$subdir/mainline/hard/*.c]] \
- "" $DEFAULT_CFLAGS
+ "$MAINLINE_FLAGS" $DEFAULT_CFLAGS
gcc-dg-runtest [lsort [glob $srcdir/$subdir/mainline/hard-sp/*.c]] \
- "" $DEFAULT_CFLAGS
+ "$MAINLINE_FLAGS" $DEFAULT_CFLAGS
}
set LTO_TORTURE_OPTIONS ${saved-lto_torture_options}
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=hard -mfpu=fpv5-sp-d16" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=soft" -mfloat-abi=softfp } {""} } */
/* { dg-skip-if "Skip these if testing double precision" {*-*-*} {"-mfpu=fpv[4-5]-d16"} {""} } */
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=hard -mfpu=fpv5-sp-d16" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=soft" -mfloat-abi=softfp } {""} } */
/* { dg-skip-if "Skip these if testing double precision" {*-*-*} {"-mfpu=fpv[4-5]-d16"} {""} } */
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=hard -mfpu=fpv5-sp-d16" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=soft" -mfloat-abi=softfp } {""} } */
/* { dg-skip-if "Skip these if testing double precision" {*-*-*} {"-mfpu=fpv[4-5]-d16"} {""} } */
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=hard -mfpu=fpv5-sp-d16" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=soft" -mfloat-abi=softfp } {""} } */
/* { dg-skip-if "Skip these if testing double precision" {*-*-*} {"-mfpu=fpv[4-5]-d16"} {""} } */
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=hard -mfpu=fpv5-d16" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=soft" -mfloat-abi=softfp } {""} } */
/* { dg-skip-if "Skip these if testing single precision" {*-*-*} {"-mfpu=*-sp-*"} {""} } */
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=hard -mfpu=fpv5-d16" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=soft" -mfloat-abi=softfp } {""} } */
/* { dg-skip-if "Skip these if testing single precision" {*-*-*} {"-mfpu=*-sp-*"} {""} } */
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=hard -mfpu=fpv5-d16" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=soft" -mfloat-abi=softfp } {""} } */
/* { dg-skip-if "Skip these if testing single precision" {*-*-*} {"-mfpu=*-sp-*"} {""} } */
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=hard -mfpu=fpv5-d16" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=soft" -mfloat-abi=softfp } {""} } */
/* { dg-skip-if "Skip these if testing single precision" {*-*-*} {"-mfpu=*-sp-*"} {""} } */
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=soft" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=hard" -mfloat-abi=softfp } {""} } */
#include "../../cmse-13.x"
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=soft" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=hard" -mfloat-abi=softfp } {""} } */
#include "../../cmse-5.x"
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=soft" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=hard" -mfloat-abi=softfp } {""} } */
#include "../../cmse-7.x"
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=soft" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=hard" -mfloat-abi=softfp } {""} } */
#include "../../cmse-8.x"
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=softfp -mfpu=fpv5-sp-d16" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=soft" -mfloat-abi=hard } {""} } */
/* { dg-skip-if "Skip these if testing double precision" {*-*-*} {"-mfpu=fpv[4-5]-d16"} {""} } */
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=softfp -mfpu=fpv5-sp-d16" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=soft" -mfloat-abi=hard } {""} } */
/* { dg-skip-if "Skip these if testing double precision" {*-*-*} {"-mfpu=fpv[4-5]-d16"} {""} } */
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=softfp -mfpu=fpv5-sp-d16" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=soft" -mfloat-abi=hard } {""} } */
/* { dg-skip-if "Skip these if testing double precision" {*-*-*} {"-mfpu=fpv[4-5]-d16"} {""} } */
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=softfp -mfpu=fpv5-d16" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=soft" -mfloat-abi=hard } {""} } */
/* { dg-skip-if "Skip these if testing single precision" {*-*-*} {"-mfpu=*-sp-*"} {""} } */
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=softfp -mfpu=fpv5-d16" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=soft" -mfloat-abi=hard } {""} } */
/* { dg-skip-if "Skip these if testing single precision" {*-*-*} {"-mfpu=*-sp-*"} {""} } */
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=softfp -mfpu=fpv5-d16" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=soft" -mfloat-abi=hard } {""} } */
/* { dg-skip-if "Skip these if testing single precision" {*-*-*} {"-mfpu=*-sp-*"} {""} } */
/* { dg-do compile } */
/* { dg-options "-mcmse -mfloat-abi=softfp -mfpu=fpv5-d16" } */
-/* { dg-require-effective-target arm_arch_v8m_main_ok } */
-/* { dg-add-options arm_arch_v8m_main } */
/* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=soft" -mfloat-abi=hard } {""} } */
/* { dg-skip-if "Skip these if testing single precision" {*-*-*} {"-mfpu=*-sp-*"} {""} } */