https://gcc.gnu.org/g:92c7a190d7e87100d7e2015220baa127480492ba

commit r15-5990-g92c7a190d7e87100d7e2015220baa127480492ba
Author: Richard Earnshaw <rearn...@arm.com>
Date:   Fri Dec 6 17:05:27 2024 +0000

    arm: testsuite: fix some legacy C tests
    
    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.

Diff:
---
 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 --git a/gcc/testsuite/gcc.target/arm/20031108-1.c 
b/gcc/testsuite/gcc.target/arm/20031108-1.c
index 7923e1151395..b99db7aa1944 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 70c295648889..c76f5377ca39 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 0c0f9cda6ba9..2aee1dc4a152 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 d8c6748d4ee9..b155be08820b 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 d2e1a8270d67..240192dd56ce 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 a96f3b584110..25f8966e73ca 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" } } */

Reply via email to