diff mbox series

[committed] arm: testsuite: fix some legacy C tests

Message ID 20241206171211.2541902-1-rearnsha@arm.com
State New
Headers show
Series [committed] arm: testsuite: fix some legacy C tests | expand

Commit Message

Richard Earnshaw Dec. 6, 2024, 5:12 p.m. UTC
These tests all lack ISO-C style function definitions.  Some
deliberatly so.  Rather than try to adjust the code and risk changing
the nature of the test, add -std=c17 to the test options.

gcc/testsuite/ChangeLog:

	* gcc.target/arm/20031108-1.c: Add -std=c17.
	* gcc.target/arm/fp16-unprototyped-1.c: Likewise.
	* gcc.target/arm/fp16-unprototyped-2.c: Likewise.
	* gcc.target/arm/neon-thumb2-move.c: Likewise.
	* gcc.target/arm/pr67756.c: Likewise.
	* gcc.target/arm/pr81863.c: Likewise.
---
 gcc/testsuite/gcc.target/arm/20031108-1.c          | 2 +-
 gcc/testsuite/gcc.target/arm/fp16-unprototyped-1.c | 2 +-
 gcc/testsuite/gcc.target/arm/fp16-unprototyped-2.c | 2 +-
 gcc/testsuite/gcc.target/arm/neon-thumb2-move.c    | 2 +-
 gcc/testsuite/gcc.target/arm/pr67756.c             | 2 +-
 gcc/testsuite/gcc.target/arm/pr81863.c             | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/arm/20031108-1.c b/gcc/testsuite/gcc.target/arm/20031108-1.c
index 7923e115139..b99db7aa194 100644
--- a/gcc/testsuite/gcc.target/arm/20031108-1.c
+++ b/gcc/testsuite/gcc.target/arm/20031108-1.c
@@ -1,7 +1,7 @@ 
 /* PR optimization/10467  */
 /* { dg-do compile } */
 /* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */
-/* { dg-options "-O2 -mthumb" } */
+/* { dg-options "-O2 -mthumb -std=c17" } */
 
 typedef enum {Ident_1} Enumeration;
 
diff --git a/gcc/testsuite/gcc.target/arm/fp16-unprototyped-1.c b/gcc/testsuite/gcc.target/arm/fp16-unprototyped-1.c
index 70c29564888..c76f5377ca3 100644
--- a/gcc/testsuite/gcc.target/arm/fp16-unprototyped-1.c
+++ b/gcc/testsuite/gcc.target/arm/fp16-unprototyped-1.c
@@ -2,7 +2,7 @@ 
    function in another compilation unit.  */
 
 /* { dg-do run } */
-/* { dg-options "-mfp16-format=ieee" } */
+/* { dg-options "-mfp16-format=ieee -std=c17" } */
 /* { dg-additional-sources "fp16-unprototyped-2.c" } */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/arm/fp16-unprototyped-2.c b/gcc/testsuite/gcc.target/arm/fp16-unprototyped-2.c
index 0c0f9cda6ba..2aee1dc4a15 100644
--- a/gcc/testsuite/gcc.target/arm/fp16-unprototyped-2.c
+++ b/gcc/testsuite/gcc.target/arm/fp16-unprototyped-2.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-mfp16-format=ieee" } */
+/* { dg-options "-mfp16-format=ieee -std=c17" } */
 
 extern int f ();
 
diff --git a/gcc/testsuite/gcc.target/arm/neon-thumb2-move.c b/gcc/testsuite/gcc.target/arm/neon-thumb2-move.c
index d8c6748d4ee..b155be08820 100644
--- a/gcc/testsuite/gcc.target/arm/neon-thumb2-move.c
+++ b/gcc/testsuite/gcc.target/arm/neon-thumb2-move.c
@@ -1,7 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_neon_ok } */
 /* { dg-require-effective-target arm_thumb2_ok } */
-/* { dg-options "-O2 -mthumb" } */
+/* { dg-options "-O2 -mthumb -std=c17" } */
 /* { dg-add-options arm_neon } */
 /* { dg-prune-output "switch .* conflicts with" } */
 
diff --git a/gcc/testsuite/gcc.target/arm/pr67756.c b/gcc/testsuite/gcc.target/arm/pr67756.c
index d2e1a8270d6..240192dd56c 100644
--- a/gcc/testsuite/gcc.target/arm/pr67756.c
+++ b/gcc/testsuite/gcc.target/arm/pr67756.c
@@ -1,6 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_hard_vfp_ok } */
-/* { dg-options "-O2 -mapcs -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16" } */
+/* { dg-options "-O2 -mapcs -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -std=c17" } */
 
 int inode_permission (), try_break_deleg ();
 int mutex_lock (), mutex_unlock ();
diff --git a/gcc/testsuite/gcc.target/arm/pr81863.c b/gcc/testsuite/gcc.target/arm/pr81863.c
index a96f3b58411..25f8966e73c 100644
--- a/gcc/testsuite/gcc.target/arm/pr81863.c
+++ b/gcc/testsuite/gcc.target/arm/pr81863.c
@@ -3,7 +3,7 @@ 
 /* { dg-require-effective-target arm_arch_v7a_arm_ok } */
 /* { dg-skip-if "-mslow-flash-data and -mword-relocations incompatible" { *-*-* } { "-mslow-flash-data" } } */
 /* { dg-skip-if "-mpure-code and -mword-relocations incompatible" { *-*-* } { "-mpure-code" } } */
-/* { dg-options "-O2 -mword-relocations" } */
+/* { dg-options "-O2 -mword-relocations -std=c17" } */
 /* { dg-add-options arm_arch_v7a_arm } */
 /* { dg-final { scan-assembler-not "\[\\t \]+movw" } } */