diff --git a/gcc/testsuite/c-c++-common/Wduplicated-branches-11.c b/gcc/testsuite/c-c++-common/Wduplicated-branches-11.c
index 70d86cf7f05..39d33f27783 100644
--- a/gcc/testsuite/c-c++-common/Wduplicated-branches-11.c
+++ b/gcc/testsuite/c-c++-common/Wduplicated-branches-11.c
@@ -1,6 +1,7 @@
 /* PR c/64279 */
 /* { dg-do compile } */
 /* { dg-options "-Wduplicated-branches" } */
+/* { dg-options "-fpermissive -Wduplicated-branches" { target c } } */
 
 int
 f (int p)
diff --git a/gcc/testsuite/c-c++-common/Wduplicated-branches-12.c b/gcc/testsuite/c-c++-common/Wduplicated-branches-12.c
index cd746f1ad30..3ba1a29366b 100644
--- a/gcc/testsuite/c-c++-common/Wduplicated-branches-12.c
+++ b/gcc/testsuite/c-c++-common/Wduplicated-branches-12.c
@@ -1,6 +1,7 @@
 /* PR c/64279 */
 /* { dg-do compile } */
 /* { dg-options "-Wduplicated-branches" } */
+/* { dg-options "-fpermissive -Wduplicated-branches" { target c } } */
 
 void
 f (int i)
diff --git a/gcc/testsuite/c-c++-common/builtins.c b/gcc/testsuite/c-c++-common/builtins.c
index 3f1ef115aed..527c77e7952 100644
--- a/gcc/testsuite/c-c++-common/builtins.c
+++ b/gcc/testsuite/c-c++-common/builtins.c
@@ -2,6 +2,7 @@
    with no prototype do not cause an ICE.
   { dg-do compile }
   { dg-options "-O2 -Wall -Wextra" }
+  { dg-additional-options "-fpermissive" { target c } }
   { dg-prune-output "warning" }
   { dg-require-effective-target alloca }  */
 
diff --git a/gcc/testsuite/c-c++-common/pointer-to-fn1.c b/gcc/testsuite/c-c++-common/pointer-to-fn1.c
index e2f948d824a..70a5831c958 100644
--- a/gcc/testsuite/c-c++-common/pointer-to-fn1.c
+++ b/gcc/testsuite/c-c++-common/pointer-to-fn1.c
@@ -1,7 +1,7 @@
 /* PR c++/106937 */
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-fcf-protection" } */
-/* { dg-additional-options "-std=c++11 -fpermissive" { target c++ } } */
+/* { dg-options "-fpermissive -fcf-protection" } */
+/* { dg-additional-options "-std=c++11" { target c++ } } */
 /* Test printing a pointer to function with attribute.  */
 
 __attribute__((nocf_check)) typedef void (*FPA1)();
diff --git a/gcc/testsuite/gcc.c-torture/compile/20010320-1.c b/gcc/testsuite/gcc.c-torture/compile/20010320-1.c
index 14686d62318..f0b54e13a6d 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20010320-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20010320-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 typedef struct sec { 
 const char *name;
 int id;
diff --git a/gcc/testsuite/gcc.c-torture/compile/20050105-1.c b/gcc/testsuite/gcc.c-torture/compile/20050105-1.c
index 16d18f30637..52f644593af 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20050105-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20050105-1.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 void bar (struct S *);
 void foo (void *x)
 {
diff --git a/gcc/testsuite/gcc.c-torture/compile/20080704-1.c b/gcc/testsuite/gcc.c-torture/compile/20080704-1.c
index b5e38b4ba60..963162947dd 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20080704-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20080704-1.c
@@ -1,5 +1,6 @@
 /* This code used to crash fold_convert due to PRE
    wanting to fold_convert from a REAL_TYPE to an INTEGER_TYPE.  */
+/* { dg-additional-options "-fpermissive" } */
 typedef unsigned int uint32_t;
 union double_union
 {
diff --git a/gcc/testsuite/gcc.c-torture/compile/20080910-1.c b/gcc/testsuite/gcc.c-torture/compile/20080910-1.c
index bf32775d401..911fb562790 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20080910-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20080910-1.c
@@ -1,5 +1,6 @@
 /* This used to crash IRA with -O3 -fPIC.
   See PR 37333.  */
+/* { dg-additional-options "-fpermissive" } */
 struct yy_buffer_state  {
   int yy_is_interactive;
 };
diff --git a/gcc/testsuite/gcc.c-torture/compile/20090917-1.c b/gcc/testsuite/gcc.c-torture/compile/20090917-1.c
index 2b8c37148bd..0e45fdc63a4 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20090917-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20090917-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 typedef int *loop_p;
 typedef struct VEC_loop_p_base
 {
diff --git a/gcc/testsuite/gcc.c-torture/compile/20100915-1.c b/gcc/testsuite/gcc.c-torture/compile/20100915-1.c
index 04f6ab0fd70..6f137a07512 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20100915-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20100915-1.c
@@ -1,5 +1,6 @@
 /* PR rtl-optimization/45593 */
 /* Testcase by Arnaud Lacombe <lacombar@gmail.com> */
+/* { dg-additional-options "-fpermissive" } */
 
 typedef unsigned int __u32;
 typedef __u32 __be32;
diff --git a/gcc/testsuite/gcc.c-torture/compile/20101216-1.c b/gcc/testsuite/gcc.c-torture/compile/20101216-1.c
index 0c58898c13f..8fae126984a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20101216-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20101216-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 typedef signed int __int32_t;
 typedef unsigned int __uint32_t;
 typedef union
diff --git a/gcc/testsuite/gcc.c-torture/compile/20121027-1.c b/gcc/testsuite/gcc.c-torture/compile/20121027-1.c
index 7c92f3fa436..3c9c9147ca7 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20121027-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20121027-1.c
@@ -1,4 +1,5 @@
 /* { dg-require-stack-size "1024+16" } */
+/* { dg-additional-options "-fpermissive" } */
 
 extern int nc;
 void f(void)
diff --git a/gcc/testsuite/gcc.c-torture/compile/20180605-1.c b/gcc/testsuite/gcc.c-torture/compile/20180605-1.c
index 915dafddad0..59669297f19 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20180605-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20180605-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 void f (int *p, int n)
 {
     int j = 0, k;
diff --git a/gcc/testsuite/gcc.c-torture/compile/950816-2.c b/gcc/testsuite/gcc.c-torture/compile/950816-2.c
index e7f3bf79453..5d3fce166bf 100644
--- a/gcc/testsuite/gcc.c-torture/compile/950816-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/950816-2.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 int func (char *);
 void
 f (void)
diff --git a/gcc/testsuite/gcc.c-torture/compile/dse.c b/gcc/testsuite/gcc.c-torture/compile/dse.c
index 908e6503eb4..0728a629dec 100644
--- a/gcc/testsuite/gcc.c-torture/compile/dse.c
+++ b/gcc/testsuite/gcc.c-torture/compile/dse.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 typedef unsigned long microblaze_reg_t;
 struct pt_regs
 {
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr100576.c b/gcc/testsuite/gcc.c-torture/compile/pr100576.c
index f16a8224c6e..ad0b6325e8d 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr100576.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr100576.c
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target non_strict_prototype } */
+/* { dg-additional-options "-fpermissive" } */
 
 /* PR middle-end/100576 */
 
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr17408.c b/gcc/testsuite/gcc.c-torture/compile/pr17408.c
index 4819673f284..6f07faec032 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr17408.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr17408.c
@@ -1,4 +1,5 @@
 /* PRs 17408 and 17409, with different options. */
+/* { dg-additional-options "-fpermissive" } */
 extern int t;
 extern int t = 0;
 void f(){t =0;}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr19121.c b/gcc/testsuite/gcc.c-torture/compile/pr19121.c
index b8f4c21f9ee..aa8f0c40f97 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr19121.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr19121.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 typedef struct interpreter {
   char Itokenbuf[256];
 } PerlInterpreter;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr26213.c b/gcc/testsuite/gcc.c-torture/compile/pr26213.c
index 7a6600c18d5..d0b0bc5f785 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr26213.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr26213.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 void
 xnanosleep (_Bool overflow)
 {
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr27341-2.c b/gcc/testsuite/gcc.c-torture/compile/pr27341-2.c
index e6be1e4712d..3714ad282c2 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr27341-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr27341-2.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 void zgemm_ (const int*, const double*);
 extern void matmul_c8 (_Complex double * dest)
 {
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr28776-2.c b/gcc/testsuite/gcc.c-torture/compile/pr28776-2.c
index 61a5d37dfa9..0165b770efa 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr28776-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr28776-2.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 typedef struct RangeCoder
 {
     unsigned char one_state[256];
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr33133.c b/gcc/testsuite/gcc.c-torture/compile/pr33133.c
index d1b09640eee..156f8fbfa11 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr33133.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr33133.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 static char newshuffle[256 + 16] = {
   0x0f, 0x08, 0x05, 0x07, 0x0c, 0x02, 0x0e, 0x09, 0x00, 0x01, 0x06, 0x0d,
     0x03, 0x04, 0x0b, 0x0a, 0x02, 0x0c, 0x0e, 0x06, 0x0f, 0x00, 0x01, 0x08,
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr34091.c b/gcc/testsuite/gcc.c-torture/compile/pr34091.c
index a623a383fd0..2ea283c3812 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr34091.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr34091.c
@@ -1,4 +1,5 @@
 /* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+/* { dg-additional-options "-fpermissive" } */
 
 typedef unsigned int GLenum;
 typedef unsigned char GLboolean;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr36154.c b/gcc/testsuite/gcc.c-torture/compile/pr36154.c
index ae3eb83fa11..1eee6be3a5f 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr36154.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr36154.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 struct eth_test_pkt {
   unsigned short len;
   unsigned short ctr;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37381.c b/gcc/testsuite/gcc.c-torture/compile/pr37381.c
index d8cd47d329d..e6a2e6f06ed 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr37381.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr37381.c
@@ -1,4 +1,5 @@
 /* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
+/* { dg-additional-options "-fpermissive" } */
 
 extern unsigned int __invalid_size_argument_for_IOC;
 typedef unsigned int __u32;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr38360.c b/gcc/testsuite/gcc.c-torture/compile/pr38360.c
index 4c67b0085ca..d261ce3c44c 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr38360.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr38360.c
@@ -1,5 +1,6 @@
 /* PR middle-end/38360 */
 /* { dg-require-effective-target untyped_assembly } */
+/* { dg-additional-options "-fpermissive" } */
 
 int
 main ()
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr40291.c b/gcc/testsuite/gcc.c-torture/compile/pr40291.c
index d50bbee6608..dc37cd776c1 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr40291.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr40291.c
@@ -1,4 +1,5 @@
 /* PR middle-end/40291 */
+/* { dg-additional-options "-fpermissive" } */
 
 int
 foo (void *x, char *y, unsigned long long z)
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41182-1.c b/gcc/testsuite/gcc.c-torture/compile/pr41182-1.c
index 017174938b3..f14faf84231 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr41182-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr41182-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 typedef long unsigned int size_t;
 int _lae_process_opts(char *pr, char *pe)
 { 
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr43635.c b/gcc/testsuite/gcc.c-torture/compile/pr43635.c
index 3875f4efcd4..cab02ec426c 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr43635.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr43635.c
@@ -1,5 +1,6 @@
 /* { dg-require-effective-target untyped_assembly } */
 /* { dg-require-effective-target indirect_calls } */
+/* { dg-additional-options "-fpermissive" } */
 
 extern void d (void);
 
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr44043.c b/gcc/testsuite/gcc.c-torture/compile/pr44043.c
index bd51089a70a..64a0f4e354e 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr44043.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr44043.c
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target indirect_calls } */
+/* { dg-additional-options "-fpermissive" } */
 
 typedef unsigned char __u8;
 typedef unsigned short __u16;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr44063.c b/gcc/testsuite/gcc.c-torture/compile/pr44063.c
index 32208f610f9..ce9fc1b9027 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr44063.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr44063.c
@@ -1,4 +1,5 @@
 /* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+/* { dg-additional-options "-fpermissive" } */
 
 typedef signed char int8_t;
 typedef short int16_t;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr44246.c b/gcc/testsuite/gcc.c-torture/compile/pr44246.c
index 6e478690351..18f238a559c 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr44246.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr44246.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 int main(int argc, char *argv[])
 {
   strcat(argv[0], "X");
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr45535.c b/gcc/testsuite/gcc.c-torture/compile/pr45535.c
index 03d15a12d05..3bafbf500dd 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr45535.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr45535.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 typedef struct {
     unsigned long pmd0;
     unsigned long pmd1;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr46934.c b/gcc/testsuite/gcc.c-torture/compile/pr46934.c
index a9c0b683315..46692565151 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr46934.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr46934.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 int caller (unsigned int reg_type)
 {
   switch (reg_type)
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr47428.c b/gcc/testsuite/gcc.c-torture/compile/pr47428.c
index 3cd7bfdf56e..914436f6b5d 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr47428.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr47428.c
@@ -1,5 +1,6 @@
 /* PR tree-optimization/47428 */
 /* { dg-require-effective-target untyped_assembly } */
+/* { dg-additional-options "-fpermissive" } */
 
 struct S
 {
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr49145.c b/gcc/testsuite/gcc.c-torture/compile/pr49145.c
index b44e1977031..b7b8744bfae 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr49145.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr49145.c
@@ -1,4 +1,6 @@
 /* { dg-require-effective-target untyped_assembly } */
+/* { dg-additional-options "-fpermissive" } */
+
 static int
 func1 (int a, int b)
 {
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr49206.c b/gcc/testsuite/gcc.c-torture/compile/pr49206.c
index 7596f6a3106..eda32df69f3 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr49206.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr49206.c
@@ -1,4 +1,6 @@
 /* { dg-require-effective-target untyped_assembly } */
+/* { dg-additional-options "-fpermissive" } */
+
 struct S1
 {
   short f0;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr51694.c b/gcc/testsuite/gcc.c-torture/compile/pr51694.c
index c06bc2118aa..9eddc0bf405 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr51694.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr51694.c
@@ -1,5 +1,6 @@
 /* { dg-require-effective-target untyped_assembly } */
 /* { dg-require-effective-target indirect_calls } */
+/* { dg-additional-options "-fpermissive" } */
 
 void
 foo (x, fn)
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr53886.c b/gcc/testsuite/gcc.c-torture/compile/pr53886.c
index 89b69663529..d1c7accb54a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr53886.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr53886.c
@@ -1,4 +1,6 @@
 /* PR target/53886  */
+/* { dg-additional-options "-fpermissive" } */
+
 typedef struct asn1_string_st ASN1_BIT_STRING;
 typedef struct bignum_st BIGNUM;
 typedef struct ec_group_st EC_GROUP;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr65241.c b/gcc/testsuite/gcc.c-torture/compile/pr65241.c
index dd76ac53098..75e11a26dcc 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr65241.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr65241.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 enum E { A, B, C, D };
 void fn4 (void);
 
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr72802.c b/gcc/testsuite/gcc.c-torture/compile/pr72802.c
index b9e1ab31580..6aa7f2ee608 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr72802.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr72802.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 static a[];
 static b, h, m, n, o, p, q, t, u, v, t5, t6, t16, t17, t18, t25;
 c;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr81360.c b/gcc/testsuite/gcc.c-torture/compile/pr81360.c
index ffd3f2472de..b709a859404 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr81360.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr81360.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 typedef a;
 b(void *c, a d) {
   if (c)
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr82052.c b/gcc/testsuite/gcc.c-torture/compile/pr82052.c
index 09fac5edb1e..f13e7d9da44 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr82052.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr82052.c
@@ -1,4 +1,5 @@
 /* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+/* { dg-additional-options "-fpermissive" } */
 
 typedef unsigned char uint8_t;
 typedef unsigned short uint16_t;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr90275-2.c b/gcc/testsuite/gcc.c-torture/compile/pr90275-2.c
index 9ebf7d9fd1a..f8ed5ac917d 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr90275-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr90275-2.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 
 void
 a() {
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr90275.c b/gcc/testsuite/gcc.c-torture/compile/pr90275.c
index 83e0df77226..bdf654219e8 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr90275.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr90275.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 a, b, c;
 
 long long d;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr96796.c b/gcc/testsuite/gcc.c-torture/compile/pr96796.c
index 82c7512f88b..debbe62e22f 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr96796.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr96796.c
@@ -1,4 +1,4 @@
-/* { dg-additional-options "-fcommon" } */
+/* { dg-additional-options "-fpermissive -fcommon" } */
 /* { dg-require-effective-target non_strict_prototype } */
 
 struct S0 {
diff --git a/gcc/testsuite/gcc.c-torture/compile/regs-arg-size.c b/gcc/testsuite/gcc.c-torture/compile/regs-arg-size.c
index 77518866d3f..2e10f628f0f 100644
--- a/gcc/testsuite/gcc.c-torture/compile/regs-arg-size.c
+++ b/gcc/testsuite/gcc.c-torture/compile/regs-arg-size.c
@@ -1,4 +1,5 @@
 /* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
+/* { dg-additional-options "-fpermissive" } */
 
 int foo;
 typedef long unsigned int size_t;
diff --git a/gcc/testsuite/gcc.c-torture/compile/udivmod4.c b/gcc/testsuite/gcc.c-torture/compile/udivmod4.c
index 40d2fa8d07c..9d98a3d575d 100644
--- a/gcc/testsuite/gcc.c-torture/compile/udivmod4.c
+++ b/gcc/testsuite/gcc.c-torture/compile/udivmod4.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 long long
 xlrandom ()
 {
diff --git a/gcc/testsuite/gcc.c-torture/compile/widechar-1.c b/gcc/testsuite/gcc.c-torture/compile/widechar-1.c
index 5d89f33a864..6a446d0b0e7 100644
--- a/gcc/testsuite/gcc.c-torture/compile/widechar-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/widechar-1.c
@@ -1 +1,2 @@
+/* { dg-additional-options "-fpermissive" } */
 char *s = L"a" "b";
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000412-3.c b/gcc/testsuite/gcc.c-torture/execute/20000412-3.c
index a5cb3eece03..305454ac2a8 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20000412-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20000412-3.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 typedef struct {
   char y;
   char x[32];
diff --git a/gcc/testsuite/gcc.c-torture/execute/20010605-2.c b/gcc/testsuite/gcc.c-torture/execute/20010605-2.c
index 09c7f76ac82..837e0a960d6 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20010605-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20010605-2.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 void foo (), bar (), baz ();
 int main ()
 {
diff --git a/gcc/testsuite/gcc.c-torture/execute/20020314-1.c b/gcc/testsuite/gcc.c-torture/execute/20020314-1.c
index 2f68ae8ff6d..8484256fc54 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20020314-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20020314-1.c
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target alloca } */
+/* { dg-additional-options "-fpermissive" } */
 void f(void * a, double y)
 {
 }
diff --git a/gcc/testsuite/gcc.c-torture/execute/20020819-1.c b/gcc/testsuite/gcc.c-torture/execute/20020819-1.c
index 549da910cd4..6ef3e2e0c0e 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20020819-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20020819-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 foo ()
 {
   return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20031211-2.c b/gcc/testsuite/gcc.c-torture/execute/20031211-2.c
index 555b17d9ac6..036a70d385a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20031211-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20031211-2.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 struct a
 {
   unsigned int bitfield : 3;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040223-1.c b/gcc/testsuite/gcc.c-torture/execute/20040223-1.c
index c295e4b09ea..4ec6ba71aaa 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20040223-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20040223-1.c
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target alloca } */
+/* { dg-additional-options "-fpermissive" } */
 #include <string.h>
 #include <stdio.h>
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/20041019-1.c b/gcc/testsuite/gcc.c-torture/execute/20041019-1.c
index 3c56b31e9ce..d497d75f6f0 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20041019-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20041019-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 test_store_ccp (int i)
 {
   int *p, a, b, c;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20120427-1.c b/gcc/testsuite/gcc.c-torture/execute/20120427-1.c
index 46ed76ae943..fe7d072d2ae 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20120427-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20120427-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 typedef struct sreal
 {
   unsigned sig;		/* Significant.  */
diff --git a/gcc/testsuite/gcc.c-torture/execute/20120427-2.c b/gcc/testsuite/gcc.c-torture/execute/20120427-2.c
index e473a4772a9..c8e01216240 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20120427-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20120427-2.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 typedef struct sreal
 {
   unsigned sig;		/* Significant.  */
diff --git a/gcc/testsuite/gcc.c-torture/execute/920908-2.c b/gcc/testsuite/gcc.c-torture/execute/920908-2.c
index 31c1ae0769c..ed95337e0b0 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920908-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920908-2.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 /* The bit-field below would have a problem if __INT_MAX__ is too
    small.  */
 #if __INT_MAX__ < 2147483647
diff --git a/gcc/testsuite/gcc.c-torture/execute/921110-1.c b/gcc/testsuite/gcc.c-torture/execute/921110-1.c
index b04b84a65f9..c8d4e07ff52 100644
--- a/gcc/testsuite/gcc.c-torture/execute/921110-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/921110-1.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 extern void abort(void);
 typedef void (*frob)();
 frob f[] = {abort};
diff --git a/gcc/testsuite/gcc.c-torture/execute/930111-1.c b/gcc/testsuite/gcc.c-torture/execute/930111-1.c
index e908f14f67f..3a2b069b23d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930111-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930111-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 main()
 {
   if (wwrite((long long) 0) != 123)
diff --git a/gcc/testsuite/gcc.c-torture/execute/930208-1.c b/gcc/testsuite/gcc.c-torture/execute/930208-1.c
index 464b69d437e..ee10400d4e7 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930208-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930208-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 typedef union {
   long l;
   struct { char b3, b2, b1, b0; } c;
diff --git a/gcc/testsuite/gcc.c-torture/execute/930702-1.c b/gcc/testsuite/gcc.c-torture/execute/930702-1.c
index 8828a701cb9..efe49305861 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930702-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930702-1.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 fp (double a, int b)
 {
   if (a != 33 || b != 11)
diff --git a/gcc/testsuite/gcc.c-torture/execute/930818-1.c b/gcc/testsuite/gcc.c-torture/execute/930818-1.c
index 710e3ce2fbe..530cd5fe96c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930818-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930818-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 static double one = 1.0;
 
 f()
diff --git a/gcc/testsuite/gcc.c-torture/execute/931017-1.c b/gcc/testsuite/gcc.c-torture/execute/931017-1.c
index 5917bd95b76..7c4c5450db0 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931017-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931017-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 int v;
 
 main ()
diff --git a/gcc/testsuite/gcc.c-torture/execute/931018-1.c b/gcc/testsuite/gcc.c-torture/execute/931018-1.c
index 01b6050bf35..17deed87e9f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931018-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931018-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 unsigned int a[0x1000];
 extern const unsigned long v;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/931208-1.c b/gcc/testsuite/gcc.c-torture/execute/931208-1.c
index ee2bc9f1e04..56da2ce3221 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931208-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931208-1.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 f ()
 {
   unsigned long x, y = 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/941101-1.c b/gcc/testsuite/gcc.c-torture/execute/941101-1.c
index 66b5f384a80..22542717d80 100644
--- a/gcc/testsuite/gcc.c-torture/execute/941101-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/941101-1.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 f ()
 {
   int var = 7;
diff --git a/gcc/testsuite/gcc.c-torture/execute/941110-1.c b/gcc/testsuite/gcc.c-torture/execute/941110-1.c
index b78256d3c3f..72a0a7e20f8 100644
--- a/gcc/testsuite/gcc.c-torture/execute/941110-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/941110-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 f (const int x)
 {
   int y = 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/950322-1.c b/gcc/testsuite/gcc.c-torture/execute/950322-1.c
index 28a1469fea0..993939adae4 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950322-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950322-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 f (unsigned char *a)
 {
   int i, j;
diff --git a/gcc/testsuite/gcc.c-torture/execute/950426-1.c b/gcc/testsuite/gcc.c-torture/execute/950426-1.c
index 076032c7220..fb21b86fe18 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950426-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950426-1.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 
 struct tag {
   int m1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/950512-1.c b/gcc/testsuite/gcc.c-torture/execute/950512-1.c
index 8aa116d27ca..8cc83981de9 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950512-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950512-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 unsigned
 f1 (x)
 {
diff --git a/gcc/testsuite/gcc.c-torture/execute/950621-1.c b/gcc/testsuite/gcc.c-torture/execute/950621-1.c
index 5fc5a902874..f6c3469abdf 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950621-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950621-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 struct s
 {
   int a;
diff --git a/gcc/testsuite/gcc.c-torture/execute/960218-1.c b/gcc/testsuite/gcc.c-torture/execute/960218-1.c
index dc94734a81f..7420893ffdf 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960218-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960218-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 int gl;
 
 g (x)
diff --git a/gcc/testsuite/gcc.c-torture/execute/960402-1.c b/gcc/testsuite/gcc.c-torture/execute/960402-1.c
index 601a9a3b091..526f4c59f2e 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960402-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960402-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 f (signed long long int x)
 {
   return x > 0xFFFFFFFFLL || x < -0x80000000LL;
diff --git a/gcc/testsuite/gcc.c-torture/execute/cmpsf-1.c b/gcc/testsuite/gcc.c-torture/execute/cmpsf-1.c
index 87886c6de57..e3d1ad6d75b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/cmpsf-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/cmpsf-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 #include <limits.h>
 
 #define F 140
diff --git a/gcc/testsuite/gcc.c-torture/execute/cmpsi-1.c b/gcc/testsuite/gcc.c-torture/execute/cmpsi-1.c
index 9fce104fefb..6d6d03798f7 100644
--- a/gcc/testsuite/gcc.c-torture/execute/cmpsi-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/cmpsi-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 f1 (unsigned int x, unsigned int y)
 {
   if (x == 0)
diff --git a/gcc/testsuite/gcc.c-torture/execute/cmpsi-2.c b/gcc/testsuite/gcc.c-torture/execute/cmpsi-2.c
index 52c8065dd1b..3266b5ac056 100644
--- a/gcc/testsuite/gcc.c-torture/execute/cmpsi-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/cmpsi-2.c
@@ -1,4 +1,6 @@
 /* { dg-require-effective-target int32plus } */
+/* { dg-additional-options "-fpermissive" } */
+
 #define F 140
 #define T 13
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/divmod-1.c b/gcc/testsuite/gcc.c-torture/execute/divmod-1.c
index 2bcd109708d..9b0bdc5854c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/divmod-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/divmod-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 div1 (signed char x)
 {
   return x / -1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr22061-1.c b/gcc/testsuite/gcc.c-torture/execute/pr22061-1.c
index ffd6ccc7b46..0a0f767a1d4 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr22061-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr22061-1.c
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target alloca } */
+/* { dg-additional-options "-fpermissive" } */
 int N = 1;
 void foo() {} /* Necessary to trigger the original ICE.  */
 void bar (char a[2][N]) { a[1][0] = N; }
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr55875.c b/gcc/testsuite/gcc.c-torture/execute/pr55875.c
index 4e56f7c26c1..2ed1e19d507 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr55875.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr55875.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 int a[251];
 __attribute__ ((noinline))
 t(int i)
diff --git a/gcc/testsuite/gcc.dg/20050629-1.c b/gcc/testsuite/gcc.dg/20050629-1.c
index 99d9ce823b0..cd7ab5d7dbf 100644
--- a/gcc/testsuite/gcc.dg/20050629-1.c
+++ b/gcc/testsuite/gcc.dg/20050629-1.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -w" } */
+/* { dg-options "-O2 -w -fpermissive" } */
 /* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
 
 /* This file was automatically reduced from tree-ssa-operands.c.  It
diff --git a/gcc/testsuite/gcc.dg/20080615-1.c b/gcc/testsuite/gcc.dg/20080615-1.c
index bce9476cddb..1c35b8e8ca1 100644
--- a/gcc/testsuite/gcc.dg/20080615-1.c
+++ b/gcc/testsuite/gcc.dg/20080615-1.c
@@ -1,5 +1,5 @@
 /* { dg-do compile }  */
-/* { dg-options "-w -O2" } */
+/* { dg-options "-w -fpermissive -O2" } */
 
 static int *see_bb_splay_ar = ((void *) 0);
 static void
diff --git a/gcc/testsuite/gcc.dg/Walloca-14.c b/gcc/testsuite/gcc.dg/Walloca-14.c
index 51362b2d6be..554587c051b 100644
--- a/gcc/testsuite/gcc.dg/Walloca-14.c
+++ b/gcc/testsuite/gcc.dg/Walloca-14.c
@@ -4,6 +4,7 @@
 /* { dg-skip-if "small address space" { "pdp11-*-*" } } */
 /* { dg-options "-O2 -Walloca-larger-than=126812070" { target ptr32plus }  } */
 /* { dg-options "-O2 -Walloca-larger-than=12070" { target { ! ptr32plus } } } */
+/* { dg-additional-options "-fpermissive" } */
 
 void
 g (int *p)
diff --git a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-3.c b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-3.c
index f2ec3259546..bc652793323 100644
--- a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-3.c
+++ b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-3.c
@@ -1,7 +1,7 @@
 /* PR c/83656 - missing -Wbuiltin-declaration-mismatch on declaration
    without prototype
    { dg-do compile }
-   { dg-options "-Wbuiltin-declaration-mismatch" } */
+   { dg-options "-fpermissive -Wbuiltin-declaration-mismatch" } */
 
 typedef __SIZE_TYPE__ size_t;
 
diff --git a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-9.c b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-9.c
index 82db8fe33d1..6a7b09f887c 100644
--- a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-9.c
+++ b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-9.c
@@ -1,6 +1,6 @@
 /* PR c/88886 - ice in get_constant, at c-family/c-format.c:292
    { dg-do compile }
-   { dg-options "-Wall" } */
+   { dg-options "-fpermissive -Wall" } */
 
 int sscanf (long, unsigned[], ...);   /* { dg-warning "conflicting types for built-in function .sscanf.; expected .int\\\(const char \\\*, const char \\\*, ...\\\)." } */
 
diff --git a/gcc/testsuite/gcc.dg/Wdouble-promotion.c b/gcc/testsuite/gcc.dg/Wdouble-promotion.c
index d7a61899f7f..0ad77915d8a 100644
--- a/gcc/testsuite/gcc.dg/Wdouble-promotion.c
+++ b/gcc/testsuite/gcc.dg/Wdouble-promotion.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Wdouble-promotion" } */
+/* { dg-options "-fpermissive -Wdouble-promotion" } */
 
 #include <stddef.h>
 
diff --git a/gcc/testsuite/gcc.dg/Wrestrict-5.c b/gcc/testsuite/gcc.dg/Wrestrict-5.c
index 21e190129e4..4ea9176f1f5 100644
--- a/gcc/testsuite/gcc.dg/Wrestrict-5.c
+++ b/gcc/testsuite/gcc.dg/Wrestrict-5.c
@@ -4,7 +4,7 @@
    functions declared with no prototype are checked for overlap, and that
    invalid calls are ignored.
   { dg-do compile }
-  { dg-options "-O2 -Wrestrict" }  */
+  { dg-options "-O2 -fpermissive -Wrestrict" }  */
 
 void* memcpy ();
 char* strncpy ();
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-13.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-13.c
index bd513151cea..021eaae335d 100644
--- a/gcc/testsuite/gcc.dg/Wstringop-overflow-13.c
+++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-13.c
@@ -3,7 +3,7 @@
    PR middle-end/89911 - ICE on a call with no arguments to strnlen
    declared with no prototype
    { dg-do compile }
-   { dg-options "-O2 -Wall" } */
+   { dg-options "-O2 -fpermissive -Wall" } */
 
 typedef __SIZE_TYPE__ size_t;
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-bind-pr107783.c b/gcc/testsuite/gcc.dg/analyzer/fd-bind-pr107783.c
index 36304179b43..8055e55f5c5 100644
--- a/gcc/testsuite/gcc.dg/analyzer/fd-bind-pr107783.c
+++ b/gcc/testsuite/gcc.dg/analyzer/fd-bind-pr107783.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-fpermissive" } */
+
 int
 foo (void)
 {
diff --git a/gcc/testsuite/gcc.dg/array-5.c b/gcc/testsuite/gcc.dg/array-5.c
index 4083c92ffc9..1890a998ca6 100644
--- a/gcc/testsuite/gcc.dg/array-5.c
+++ b/gcc/testsuite/gcc.dg/array-5.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-fpermissive" } */
 
 /* Check compatibility of array declarations.  */
 
diff --git a/gcc/testsuite/gcc.dg/asan/pr56417.c b/gcc/testsuite/gcc.dg/asan/pr56417.c
index b7eabf125aa..010651ef653 100644
--- a/gcc/testsuite/gcc.dg/asan/pr56417.c
+++ b/gcc/testsuite/gcc.dg/asan/pr56417.c
@@ -1,6 +1,6 @@
 /* PR sanitizer/56417 */
 /* { dg-do compile } */
-/* { dg-options "-w" } */
+/* { dg-options "-fpermissive -w" } */
 
 int
 foo (void)
diff --git a/gcc/testsuite/gcc.dg/attr-access-read-only.c b/gcc/testsuite/gcc.dg/attr-access-read-only.c
index 71175d05ca5..0763bf6439e 100644
--- a/gcc/testsuite/gcc.dg/attr-access-read-only.c
+++ b/gcc/testsuite/gcc.dg/attr-access-read-only.c
@@ -2,7 +2,7 @@
    for buffer and its size
    Test to verify the handling of attribute access (read_only) syntax.
    { dg-do compile }
-   { dg-options "-Wall -ftrack-macro-expansion=0" } */
+   { dg-options "-fpermissive -Wall -ftrack-macro-expansion=0" } */
 
 int  __attribute__ ((access))
 access_v (void);       // { dg-error "wrong number of arguments specified for 'access' attribute" }
diff --git a/gcc/testsuite/gcc.dg/attr-access-read-write.c b/gcc/testsuite/gcc.dg/attr-access-read-write.c
index 849d9f1cf67..c0d78b5e605 100644
--- a/gcc/testsuite/gcc.dg/attr-access-read-write.c
+++ b/gcc/testsuite/gcc.dg/attr-access-read-write.c
@@ -1,7 +1,7 @@
 /* PR middle-end/83859 - attribute to establish relation between parameters
    for buffer and its size
    { dg-do compile }
-   { dg-options "-Wall -ftrack-macro-expansion=0" } */
+   { dg-options "-fpermissive -Wall -ftrack-macro-expansion=0" } */
 
 int  __attribute__ ((access))
 access_v (void);       /* { dg-error "wrong number of arguments specified for 'access' attribute" } */
diff --git a/gcc/testsuite/gcc.dg/attr-access-write-only.c b/gcc/testsuite/gcc.dg/attr-access-write-only.c
index 2718b0db456..7bf30cc8b52 100644
--- a/gcc/testsuite/gcc.dg/attr-access-write-only.c
+++ b/gcc/testsuite/gcc.dg/attr-access-write-only.c
@@ -2,7 +2,7 @@
    for buffer and its size
    Test to verify the handling of attribute access (write_only) syntax.
    { dg-do compile }
-   { dg-options "-Wall -ftrack-macro-expansion=0" } */
+   { dg-options "-fpermissive -Wall -ftrack-macro-expansion=0" } */
 
 int  __attribute__ ((access))
 access_v (void);       // { dg-error "wrong number of arguments specified for 'access' attribute" }
diff --git a/gcc/testsuite/gcc.dg/bitint-36.c b/gcc/testsuite/gcc.dg/bitint-36.c
index a1358e13b8c..692b16d06c9 100644
--- a/gcc/testsuite/gcc.dg/bitint-36.c
+++ b/gcc/testsuite/gcc.dg/bitint-36.c
@@ -1,6 +1,6 @@
 /* PR c/102989 */
 /* { dg-do compile { target { bitint } } } */
-/* { dg-options "-std=c23 -Wint-in-bool-context -Waddress -Wpointer-to-int-cast -Wint-to-pointer-cast -Wint-conversion -Wshift-negative-value -Wshift-count-overflow -Wdiv-by-zero" } */
+/* { dg-options "-std=c23 -fpermissive -Wint-in-bool-context -Waddress -Wpointer-to-int-cast -Wint-to-pointer-cast -Wint-conversion -Wshift-negative-value -Wshift-count-overflow -Wdiv-by-zero" } */
 
 extern char *ax[];
 
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-10.c b/gcc/testsuite/gcc.dg/builtin-bswap-10.c
index 6c69bcd70d8..cd49fe08d1d 100644
--- a/gcc/testsuite/gcc.dg/builtin-bswap-10.c
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-10.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { ! int128 } } } */
-/* { dg-options "" } */
+/* { dg-options "-fpermissive" } */
 /* { dg-final { scan-assembler "__builtin_" } } */
 
 int foo (int x)
diff --git a/gcc/testsuite/gcc.dg/cleanup-1.c b/gcc/testsuite/gcc.dg/cleanup-1.c
index 48b82646e48..c622a62a4ad 100644
--- a/gcc/testsuite/gcc.dg/cleanup-1.c
+++ b/gcc/testsuite/gcc.dg/cleanup-1.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Wall" } */
+/* { dg-options "-fpermissive -Wall" } */
 /* Validate expected warnings and errors.  */
 
 #define U	__attribute__((unused))
diff --git a/gcc/testsuite/gcc.dg/cpp/pr60014-1.c b/gcc/testsuite/gcc.dg/cpp/pr60014-1.c
index de52b30c161..1c9b5ad19af 100644
--- a/gcc/testsuite/gcc.dg/cpp/pr60014-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/pr60014-1.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-save-temps -Wint-conversion" } */
+/* { dg-options "-fpermissive -save-temps -Wint-conversion" } */
 #include "pr60014-1.h"
 int main ()
 {
diff --git a/gcc/testsuite/gcc.dg/cpp/pr60014-2.c b/gcc/testsuite/gcc.dg/cpp/pr60014-2.c
index 115c9858ec7..d9fe81c1f5e 100644
--- a/gcc/testsuite/gcc.dg/cpp/pr60014-2.c
+++ b/gcc/testsuite/gcc.dg/cpp/pr60014-2.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-save-temps -Wint-conversion" } */
+/* { dg-options "-save-temps -fpermissive -Wint-conversion" } */
 #include "pr60014-2.h"
 X
 char *should_warn = 1; /* { dg-warning {-Wint-conversion} } */
diff --git a/gcc/testsuite/gcc.dg/cpp/pr60014-3.c b/gcc/testsuite/gcc.dg/cpp/pr60014-3.c
index c4306035f05..86545a6ae43 100644
--- a/gcc/testsuite/gcc.dg/cpp/pr60014-3.c
+++ b/gcc/testsuite/gcc.dg/cpp/pr60014-3.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-save-temps -Wint-conversion" } */
+/* { dg-options "-save-temps -fpermissive -Wint-conversion" } */
 #include "pr60014-3.h"
 
 /* The line continuation on the next line is what triggers the problem here,
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-bit-cp-1.c b/gcc/testsuite/gcc.dg/ipa/ipa-bit-cp-1.c
index 2ec5fe54f55..7b920ca539a 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-bit-cp-1.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-bit-cp-1.c
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "-O2 -w -fipa-bit-cp"  } */
+/* { dg-options "-fpermissive -O2 -w -fipa-bit-cp"  } */
 static int
 __attribute__ ((noinline))
 test (int a)
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-bit-cp-2.c b/gcc/testsuite/gcc.dg/ipa/ipa-bit-cp-2.c
index 42ce346948c..3a2c9c8adb3 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-bit-cp-2.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-bit-cp-2.c
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "-O2 -w -fipa-bit-cp"  } */
+/* { dg-options "-fpermissive -O2 -w -fipa-bit-cp"  } */
 static int
 __attribute__ ((noinline))
 test (int __attribute__((unused)) b, int a)
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-bit-cp.c b/gcc/testsuite/gcc.dg/ipa/ipa-bit-cp.c
index 2ec5fe54f55..7b920ca539a 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-bit-cp.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-bit-cp.c
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "-O2 -w -fipa-bit-cp"  } */
+/* { dg-options "-fpermissive -O2 -w -fipa-bit-cp"  } */
 static int
 __attribute__ ((noinline))
 test (int a)
diff --git a/gcc/testsuite/gcc.dg/ipa/pr105639.c b/gcc/testsuite/gcc.dg/ipa/pr105639.c
index 5534fe93fbf..93bf037720a 100644
--- a/gcc/testsuite/gcc.dg/ipa/pr105639.c
+++ b/gcc/testsuite/gcc.dg/ipa/pr105639.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O -w" } */
+/* { dg-options "-fpermissive -O -w" } */
 
 void typedef (*cb) (void);
 
diff --git a/gcc/testsuite/gcc.dg/ipa/pr71981.c b/gcc/testsuite/gcc.dg/ipa/pr71981.c
index 1b2160246e8..eddc8c851d6 100644
--- a/gcc/testsuite/gcc.dg/ipa/pr71981.c
+++ b/gcc/testsuite/gcc.dg/ipa/pr71981.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -w" } */
+/* { dg-options "-fpermissive -O2 -w" } */
 
 int **a;
 static void fn1(char **p1) {
diff --git a/gcc/testsuite/gcc.dg/lto/20081109_0.c b/gcc/testsuite/gcc.dg/lto/20081109_0.c
index eaa25f673d3..78a73c0d750 100644
--- a/gcc/testsuite/gcc.dg/lto/20081109_0.c
+++ b/gcc/testsuite/gcc.dg/lto/20081109_0.c
@@ -1,3 +1,3 @@
 /* { dg-lto-do assemble } */
-/* { dg-lto-options {{-w -flto}} }  */
+/* { dg-lto-options {{-fpermissive -w -flto}} }  */
 void Foo(void) { char bar[1]; free(bar); }
diff --git a/gcc/testsuite/gcc.dg/lto/pr54702_1.c b/gcc/testsuite/gcc.dg/lto/pr54702_1.c
index 2afb0fbc063..c304682e92f 100644
--- a/gcc/testsuite/gcc.dg/lto/pr54702_1.c
+++ b/gcc/testsuite/gcc.dg/lto/pr54702_1.c
@@ -1,3 +1,4 @@
+/* { dg-options "-fpermissive" } */
 int *b;
 void *d;
 int c;
diff --git a/gcc/testsuite/gcc.dg/lto/pr55525_0.c b/gcc/testsuite/gcc.dg/lto/pr55525_0.c
index d8d16d11d32..5976a935ab3 100644
--- a/gcc/testsuite/gcc.dg/lto/pr55525_0.c
+++ b/gcc/testsuite/gcc.dg/lto/pr55525_0.c
@@ -1,5 +1,5 @@
 /* { dg-lto-do link } */
-/* { dg-lto-options { { -fcommon -flto -w } } } */
+/* { dg-lto-options { { -fpermissive -fcommon -flto -w } } } */
 
 char s[sizeof (char *)];
 int main(void)
diff --git a/gcc/testsuite/gcc.dg/noncompile/20020213-1.c b/gcc/testsuite/gcc.dg/noncompile/20020213-1.c
index fa86e4789ff..28b158eda71 100644
--- a/gcc/testsuite/gcc.dg/noncompile/20020213-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/20020213-1.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 /* PR c/5503
    Test whether argument checking is done for fputs, bzero and bcmp.  */
 typedef struct { int i; } FILE;
diff --git a/gcc/testsuite/gcc.dg/noncompile/pr71426.c b/gcc/testsuite/gcc.dg/noncompile/pr71426.c
index 874e18976e9..fe2f2f65c64 100644
--- a/gcc/testsuite/gcc.dg/noncompile/pr71426.c
+++ b/gcc/testsuite/gcc.dg/noncompile/pr71426.c
@@ -1,5 +1,5 @@
 /* PR c/71426 */
 /* { dg-do compile } */
-/* { dg-options "-w" } */
+/* { dg-options "-fpermissive -w" } */
 
 int f (int x[x - x ()]); /* { dg-error "undeclared" } */
diff --git a/gcc/testsuite/gcc.dg/noncompile/undeclared-1.c b/gcc/testsuite/gcc.dg/noncompile/undeclared-1.c
index 5bb7c2a4df9..0131ef50ee9 100644
--- a/gcc/testsuite/gcc.dg/noncompile/undeclared-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/undeclared-1.c
@@ -1,6 +1,6 @@
 /* Test for no ICE with an undeclared identifier in an enum in old-style
    parameter decls.  PR 12560.  */
-/* { dg-options "-w" } */
+/* { dg-options "-fpermissive -w" } */
 
 foo(c)
      enum { a = b } c;  /* { dg-error "undeclared|for each" } */
diff --git a/gcc/testsuite/gcc.dg/overflow-warn-2.c b/gcc/testsuite/gcc.dg/overflow-warn-2.c
index 9232800fb2e..b3b7dbbb7e7 100644
--- a/gcc/testsuite/gcc.dg/overflow-warn-2.c
+++ b/gcc/testsuite/gcc.dg/overflow-warn-2.c
@@ -1,7 +1,7 @@
 /* Test for diagnostics for constant overflow.  Test with -Wtraditional-conversion.  */
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
-/* { dg-options "-std=c99 -Wtraditional-conversion" } */
+/* { dg-options "-std=c99 -fpermissive -Wtraditional-conversion" } */
 
 #include <limits.h>
 
diff --git a/gcc/testsuite/gcc.dg/pr100142.c b/gcc/testsuite/gcc.dg/pr100142.c
index aec146cb0a9..fef271a2d23 100644
--- a/gcc/testsuite/gcc.dg/pr100142.c
+++ b/gcc/testsuite/gcc.dg/pr100142.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-fpreprocessed" } */
+/* { dg-options "-fpermissive -fpreprocessed" } */
 
 void
 foo (void)
diff --git a/gcc/testsuite/gcc.dg/pr100790.c b/gcc/testsuite/gcc.dg/pr100790.c
index 31e0effdea2..3e00c1b6ced 100644
--- a/gcc/testsuite/gcc.dg/pr100790.c
+++ b/gcc/testsuite/gcc.dg/pr100790.c
@@ -1,4 +1,4 @@
 // { dg-do compile }
-// { dg-options "-O2 -w" }
+// { dg-options "-fpermissive -O2 -w" }
 
 __builtin_clz(int x) { x ? __builtin_clz(x) : 32; }
diff --git a/gcc/testsuite/gcc.dg/pr100791.c b/gcc/testsuite/gcc.dg/pr100791.c
index 96cf34f14a4..00cc4b185a3 100644
--- a/gcc/testsuite/gcc.dg/pr100791.c
+++ b/gcc/testsuite/gcc.dg/pr100791.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-fpermissive" } */
 
 static inline int __attribute__((__always_inline__))
 foo ()
diff --git a/gcc/testsuite/gcc.dg/pr103093.c b/gcc/testsuite/gcc.dg/pr103093.c
index f42572147ad..36ec1b9d098 100644
--- a/gcc/testsuite/gcc.dg/pr103093.c
+++ b/gcc/testsuite/gcc.dg/pr103093.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-fpermissive -O2" } */
 
 int i_0, c_4, uc_7, func_2_c_11;
 
diff --git a/gcc/testsuite/gcc.dg/pr105140.c b/gcc/testsuite/gcc.dg/pr105140.c
index 7d30985e850..173dc8c2fac 100644
--- a/gcc/testsuite/gcc.dg/pr105140.c
+++ b/gcc/testsuite/gcc.dg/pr105140.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Os -w -Wno-psabi" } */
+/* { dg-options "-fpermissive -Os -w -Wno-psabi" } */
 /* { dg-skip-if "PR105147" { powerpc*-*-* s390*-*-* } } */
 
 typedef char __attribute__((__vector_size__ (16 * sizeof (char)))) U;
diff --git a/gcc/testsuite/gcc.dg/pr105250.c b/gcc/testsuite/gcc.dg/pr105250.c
index 4683e0e63a2..c4f4ea0c3d7 100644
--- a/gcc/testsuite/gcc.dg/pr105250.c
+++ b/gcc/testsuite/gcc.dg/pr105250.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-w -Wno-psabi -O2" } */
+/* { dg-options "-fpermissive -w -Wno-psabi -O2" } */
 /* { dg-skip-if "PR105266" { powerpc*-*-* s390*-*-* } } */
 
 typedef int __attribute__((__vector_size__(4))) T;
diff --git a/gcc/testsuite/gcc.dg/pr105853.c b/gcc/testsuite/gcc.dg/pr105853.c
index 4f234ac11d9..c0a86ee6a19 100644
--- a/gcc/testsuite/gcc.dg/pr105853.c
+++ b/gcc/testsuite/gcc.dg/pr105853.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-fpermissive -O2" } */
 
 struct {
   struct {
diff --git a/gcc/testsuite/gcc.dg/pr105856.c b/gcc/testsuite/gcc.dg/pr105856.c
index dd3aa2f18c0..c8f0851599d 100644
--- a/gcc/testsuite/gcc.dg/pr105856.c
+++ b/gcc/testsuite/gcc.dg/pr105856.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-fpermissive -O2" } */
 #pragma pack(1)
 struct {
   unsigned f0;
diff --git a/gcc/testsuite/gcc.dg/pr26865.c b/gcc/testsuite/gcc.dg/pr26865.c
index f49d1d29f9c..e62030f60ab 100644
--- a/gcc/testsuite/gcc.dg/pr26865.c
+++ b/gcc/testsuite/gcc.dg/pr26865.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -std=c99" } */
+/* { dg-options "-fpermissive -O2 -std=c99" } */
 
 void
 foo (void)
diff --git a/gcc/testsuite/gcc.dg/pr40989.c b/gcc/testsuite/gcc.dg/pr40989.c
index 0fbc87082d3..95392585a6a 100644
--- a/gcc/testsuite/gcc.dg/pr40989.c
+++ b/gcc/testsuite/gcc.dg/pr40989.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Werror=implicit" } */
+/* { dg-options "-fpermissive -Werror=implicit" } */
 int main() {
   return pippo(); /* { dg-error "" } */
 }
diff --git a/gcc/testsuite/gcc.dg/pr42715.c b/gcc/testsuite/gcc.dg/pr42715.c
index 72bdfc86244..09237c6a4a3 100644
--- a/gcc/testsuite/gcc.dg/pr42715.c
+++ b/gcc/testsuite/gcc.dg/pr42715.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target fpic } } */
-/* { dg-options "-fPIC -g -O2 -w" } */
+/* { dg-options "-fPIC -g -O2 -fpermissive -w" } */
 /* var-tracking failed to clobber the reg holding v at the asm insn,
    so v ended up bound to an intermediate PIC expression.  */
 
diff --git a/gcc/testsuite/gcc.dg/pr44971.c b/gcc/testsuite/gcc.dg/pr44971.c
index a1faef51be1..5cd314c2665 100644
--- a/gcc/testsuite/gcc.dg/pr44971.c
+++ b/gcc/testsuite/gcc.dg/pr44971.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fcompare-debug -w" } */
+/* { dg-options "-O2 -fpermissive -fcompare-debug -w" } */
 
 typedef struct
 {
diff --git a/gcc/testsuite/gcc.dg/pr46571.c b/gcc/testsuite/gcc.dg/pr46571.c
index 435812210ea..393025b65dd 100644
--- a/gcc/testsuite/gcc.dg/pr46571.c
+++ b/gcc/testsuite/gcc.dg/pr46571.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fcompare-debug -w" } */
+/* { dg-options "-O2 -fpermissive -fcompare-debug -w" } */
 
 typedef union tree_node *tree;
 typedef unsigned int source_location;
diff --git a/gcc/testsuite/gcc.dg/pr54363.c b/gcc/testsuite/gcc.dg/pr54363.c
index aea0f9057b0..bea284ac975 100644
--- a/gcc/testsuite/gcc.dg/pr54363.c
+++ b/gcc/testsuite/gcc.dg/pr54363.c
@@ -1,6 +1,6 @@
 /* PR c/54363 */
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
+/* { dg-options "-fpermissive -std=gnu99" } */
 
 struct S { char **a; };
 
diff --git a/gcc/testsuite/gcc.dg/pr56724-2.c b/gcc/testsuite/gcc.dg/pr56724-2.c
index 4abb7d899e7..db6b452ad20 100644
--- a/gcc/testsuite/gcc.dg/pr56724-2.c
+++ b/gcc/testsuite/gcc.dg/pr56724-2.c
@@ -1,6 +1,6 @@
 /* PR c/56724 */
 /* { dg-do compile } */
-/* { dg-options "-Wc++-compat -Wpedantic" } */
+/* { dg-options "-fpermissive -Wc++-compat -Wpedantic" } */
 
 enum E1 { A };
 enum E2 { B };
diff --git a/gcc/testsuite/gcc.dg/pr59630.c b/gcc/testsuite/gcc.dg/pr59630.c
index 6a3c72552f5..693e2b9c18e 100644
--- a/gcc/testsuite/gcc.dg/pr59630.c
+++ b/gcc/testsuite/gcc.dg/pr59630.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O" } */
+/* { dg-options "-fpermissive -O" } */
 
 _Bool foo()
 {
diff --git a/gcc/testsuite/gcc.dg/pr67043.c b/gcc/testsuite/gcc.dg/pr67043.c
index 36aa68673f1..746fb971793 100644
--- a/gcc/testsuite/gcc.dg/pr67043.c
+++ b/gcc/testsuite/gcc.dg/pr67043.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O3 -fcompare-debug -w" } */
+/* { dg-options "-O3 -fcompare-debug -fpermissive -w" } */
 
 extern void rt_mutex_owner (void);
 extern void rt_mutex_deadlock_account_lock (int);
diff --git a/gcc/testsuite/gcc.dg/pr67730-1.c b/gcc/testsuite/gcc.dg/pr67730-1.c
index bb82f6d8e85..2e1f5b51ffc 100644
--- a/gcc/testsuite/gcc.dg/pr67730-1.c
+++ b/gcc/testsuite/gcc.dg/pr67730-1.c
@@ -1,6 +1,6 @@
 /* PR c/67730 */
 /* { dg-do compile } */
-/* { dg-options "-Wc++-compat" } */
+/* { dg-options "-Wc++-compat -fpermissive" } */
 
 #include "pr67730.h"
 
diff --git a/gcc/testsuite/gcc.dg/pr67730-2.c b/gcc/testsuite/gcc.dg/pr67730-2.c
index 260cc3e3821..b21555cf6aa 100644
--- a/gcc/testsuite/gcc.dg/pr67730-2.c
+++ b/gcc/testsuite/gcc.dg/pr67730-2.c
@@ -1,6 +1,6 @@
 /* PR c/67730 */
 /* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-fpermissive" } */
 
 #include "pr67730.h"
 
diff --git a/gcc/testsuite/gcc.dg/pr68320.c b/gcc/testsuite/gcc.dg/pr68320.c
index 5d891b9bb1e..6f22f0a68d9 100644
--- a/gcc/testsuite/gcc.dg/pr68320.c
+++ b/gcc/testsuite/gcc.dg/pr68320.c
@@ -1,6 +1,6 @@
 /* PR c/68320 */
 /* { dg-do compile } */
-/* { dg-options "" } */
+/* { dg-options "-fpermissive" } */
 
 void
 fn1 (void)
diff --git a/gcc/testsuite/gcc.dg/pr69156.c b/gcc/testsuite/gcc.dg/pr69156.c
index 522ac00be46..5740971383c 100644
--- a/gcc/testsuite/gcc.dg/pr69156.c
+++ b/gcc/testsuite/gcc.dg/pr69156.c
@@ -1,6 +1,6 @@
 /* PR tree-optimization/69156 */
 /* { dg-do compile } */
-/* { dg-options "-O1 -fno-tree-ccp" } */
+/* { dg-options "-fpermissive -O1 -fno-tree-ccp" } */
 
 _Bool
 foo ()
diff --git a/gcc/testsuite/gcc.dg/pr69824.c b/gcc/testsuite/gcc.dg/pr69824.c
index e2913f8f3d0..899bed34097 100644
--- a/gcc/testsuite/gcc.dg/pr69824.c
+++ b/gcc/testsuite/gcc.dg/pr69824.c
@@ -1,4 +1,4 @@
 /* { dg-do compile } */
-/* { dg-options "-w" } */
+/* { dg-options "-fpermissive -w" } */
 int bar() { return foo(); }
 void baz(int c[foo()]) { return; }
diff --git a/gcc/testsuite/gcc.dg/pr70174.c b/gcc/testsuite/gcc.dg/pr70174.c
index 59d231e1623..275ba36185d 100644
--- a/gcc/testsuite/gcc.dg/pr70174.c
+++ b/gcc/testsuite/gcc.dg/pr70174.c
@@ -1,6 +1,6 @@
 /* PR rtl-optimization/70174 */
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-fpermissive -O2" } */
 
 struct S { int f : 4; } a;
   
diff --git a/gcc/testsuite/gcc.dg/pr70281.c b/gcc/testsuite/gcc.dg/pr70281.c
index 9447fb1f2a8..7d408545452 100644
--- a/gcc/testsuite/gcc.dg/pr70281.c
+++ b/gcc/testsuite/gcc.dg/pr70281.c
@@ -1,4 +1,4 @@
-/* { dg-options "-Wall -fdiagnostics-show-caret" } */
+/* { dg-options "-fpermissive -Wall -fdiagnostics-show-caret" } */
 int bch_stats_show ()
 {
   return __builtin_types_compatible_p (unsigned, int) ? "" : "";  /* { dg-warning "cast" } */
diff --git a/gcc/testsuite/gcc.dg/pr77862.c b/gcc/testsuite/gcc.dg/pr77862.c
index a048cb4a74f..3ff8d082ef7 100644
--- a/gcc/testsuite/gcc.dg/pr77862.c
+++ b/gcc/testsuite/gcc.dg/pr77862.c
@@ -2,7 +2,7 @@
 /* PR tree-optimization/77862 */
 /* { dg-do compile } */
 /* { dg-require-effective-target fpic } */
-/* { dg-options "-O2 -fPIC -w" } */
+/* { dg-options "-fpermissive -O2 -fPIC -w" } */
 
 struct paramed_type
 {
diff --git a/gcc/testsuite/gcc.dg/pr82765.c b/gcc/testsuite/gcc.dg/pr82765.c
index dde0aeba7ef..03534b0cbd5 100644
--- a/gcc/testsuite/gcc.dg/pr82765.c
+++ b/gcc/testsuite/gcc.dg/pr82765.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Os -w" } */
+/* { dg-options "-fpermissive -Os -w" } */
 
 int a[1][1];
 int main() { int *b[] = {a, a[1820408606019012862278468], a, a, a}; }
diff --git a/gcc/testsuite/gcc.dg/pr83852.c b/gcc/testsuite/gcc.dg/pr83852.c
index 68ef78b8e10..602cc591d27 100644
--- a/gcc/testsuite/gcc.dg/pr83852.c
+++ b/gcc/testsuite/gcc.dg/pr83852.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
-/* { dg-options "-std=gnu99 -O2 -fselective-scheduling -fno-if-conversion -fno-tree-dse -w" } */
+/* { dg-options "-std=gnu99 -fpermissive -O2 -fselective-scheduling -fno-if-conversion -fno-tree-dse -w" } */
 long long int uo;
 unsigned int vt;
 
diff --git a/gcc/testsuite/gcc.dg/pr84206.c b/gcc/testsuite/gcc.dg/pr84206.c
index b4ac9c24c78..424f474e3b8 100644
--- a/gcc/testsuite/gcc.dg/pr84206.c
+++ b/gcc/testsuite/gcc.dg/pr84206.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O2 -fselective-scheduling -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-forward-propagate -fno-tree-fre -w" } */
+/* { dg-options "-fpermissive -O2 -fselective-scheduling -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-forward-propagate -fno-tree-fre -w" } */
 
 long long unsigned int ao;
 int hk;
diff --git a/gcc/testsuite/gcc.dg/pr85164-1.c b/gcc/testsuite/gcc.dg/pr85164-1.c
index 4c5995e8875..1594dbc46b3 100644
--- a/gcc/testsuite/gcc.dg/pr85164-1.c
+++ b/gcc/testsuite/gcc.dg/pr85164-1.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -w" } */
+/* { dg-options "-fpermissive -O2 -w" } */
 a[];
 b;
 c() {
diff --git a/gcc/testsuite/gcc.dg/pr85955.c b/gcc/testsuite/gcc.dg/pr85955.c
index 7f67f62dce6..4c15ff40604 100644
--- a/gcc/testsuite/gcc.dg/pr85955.c
+++ b/gcc/testsuite/gcc.dg/pr85955.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -w" } */
+/* { dg-options "-fpermissive -O2 -w" } */
 
 extern void sincos(double x, double *sinx, double *cosx);
 void apply(void (*f)(double, double *, double *),
diff --git a/gcc/testsuite/gcc.dg/pr86271.c b/gcc/testsuite/gcc.dg/pr86271.c
index 1200533d4d9..f020c1b1e2f 100644
--- a/gcc/testsuite/gcc.dg/pr86271.c
+++ b/gcc/testsuite/gcc.dg/pr86271.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-fpermissive -O2" } */
 
 int main ()
 {
diff --git a/gcc/testsuite/gcc.dg/pr86928.c b/gcc/testsuite/gcc.dg/pr86928.c
index 46b7644836c..1e56b2970ff 100644
--- a/gcc/testsuite/gcc.dg/pr86928.c
+++ b/gcc/testsuite/gcc.dg/pr86928.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O2 -fnon-call-exceptions -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fselective-scheduling -fno-if-conversion -fno-tree-dce -w" } */
+/* { dg-options "-fpermissive -O2 -fnon-call-exceptions -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fselective-scheduling -fno-if-conversion -fno-tree-dce -w" } */
 
 int kn;
 
diff --git a/gcc/testsuite/gcc.dg/pr99122-1.c b/gcc/testsuite/gcc.dg/pr99122-1.c
index 5dfc0a85ad4..d535bdd7173 100644
--- a/gcc/testsuite/gcc.dg/pr99122-1.c
+++ b/gcc/testsuite/gcc.dg/pr99122-1.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -g -w" } */
+/* { dg-options "-O2 -fpermissive -g -w" } */
 
 void f ()
 {
diff --git a/gcc/testsuite/gcc.dg/pr99136.c b/gcc/testsuite/gcc.dg/pr99136.c
index 1bd8446811b..cd1cc1ba5a7 100644
--- a/gcc/testsuite/gcc.dg/pr99136.c
+++ b/gcc/testsuite/gcc.dg/pr99136.c
@@ -1,6 +1,6 @@
 /* PR c/99136 */
 /* { dg-do compile } */
-/* { dg-options "-w -fexcess-precision=standard" } */
+/* { dg-options "-fpermissive -w -fexcess-precision=standard" } */
 
 void
 foo (double x)
diff --git a/gcc/testsuite/gcc.dg/redecl-19.c b/gcc/testsuite/gcc.dg/redecl-19.c
index cc10685448b..08e1146cae4 100644
--- a/gcc/testsuite/gcc.dg/redecl-19.c
+++ b/gcc/testsuite/gcc.dg/redecl-19.c
@@ -1,5 +1,5 @@
 /* We used to ICE in the gimplifier, PR 106764 */
 /* { dg-do compile } */
-/* { dg-options "-w" } */
+/* { dg-options "-fpermissive -w" } */
 (*a)(); // { dg-note "" }
 b(){a()} a; // { dg-error "" }
diff --git a/gcc/testsuite/gcc.dg/redecl-24.c b/gcc/testsuite/gcc.dg/redecl-24.c
index f0f7a723ab8..c895df94c90 100644
--- a/gcc/testsuite/gcc.dg/redecl-24.c
+++ b/gcc/testsuite/gcc.dg/redecl-24.c
@@ -1,6 +1,6 @@
 /* We used to ICE in the gimplifier, PR 106560 */
 /* { dg-do compile } */
-/* { dg-options "-w" } */
+/* { dg-options "-fpermissive -w" } */
 void **a, **b; /* { dg-note "" } */
 c(){b = a;}  
 a = /* { dg-error "" } */
diff --git a/gcc/testsuite/gcc.dg/torture/pr39204.c b/gcc/testsuite/gcc.dg/torture/pr39204.c
index 1389a52ec58..b8145b059ad 100644
--- a/gcc/testsuite/gcc.dg/torture/pr39204.c
+++ b/gcc/testsuite/gcc.dg/torture/pr39204.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-w" } */
+/* { dg-options "-fpermissive -w" } */
 
 __extension__ typedef __SIZE_TYPE__ size_t;
 typedef unsigned char __u_char;
diff --git a/gcc/testsuite/gcc.dg/torture/pr57676.c b/gcc/testsuite/gcc.dg/torture/pr57676.c
index a8cacc630b3..9762e818a89 100644
--- a/gcc/testsuite/gcc.dg/torture/pr57676.c
+++ b/gcc/testsuite/gcc.dg/torture/pr57676.c
@@ -1,7 +1,7 @@
 /* Verify that LRA does not abort prematurely in a release build of the
    compiler.  */
 /* { dg-do compile } */
-/* { dg-options "-fno-checking -w -funroll-loops" } */
+/* { dg-options "-fpermissive -fno-checking -w -funroll-loops" } */
 
 int a, b, c;
 
diff --git a/gcc/testsuite/gcc.dg/torture/pr67222.c b/gcc/testsuite/gcc.dg/torture/pr67222.c
index 1beba6dd22c..29b32b119b8 100644
--- a/gcc/testsuite/gcc.dg/torture/pr67222.c
+++ b/gcc/testsuite/gcc.dg/torture/pr67222.c
@@ -1,5 +1,6 @@
 /* PR middle-end/67222 - ICE in gimple_call_arg with bogus posix_memalign */
 /* { dg-do compile } */
+/* { dg-additional-options "-fpermissive" } */
 
 void
 foo (void **p)
diff --git a/gcc/testsuite/gcc.dg/torture/pr79125.c b/gcc/testsuite/gcc.dg/torture/pr79125.c
index b5a39f560a5..e9a17557715 100644
--- a/gcc/testsuite/gcc.dg/torture/pr79125.c
+++ b/gcc/testsuite/gcc.dg/torture/pr79125.c
@@ -1,3 +1,4 @@
+/* { dg-additional-options "-fpermissive" } */
 int za;
 
 void
diff --git a/gcc/testsuite/gcc.dg/torture/pr94479.c b/gcc/testsuite/gcc.dg/torture/pr94479.c
index 3e4058279aa..3189cd16234 100644
--- a/gcc/testsuite/gcc.dg/torture/pr94479.c
+++ b/gcc/testsuite/gcc.dg/torture/pr94479.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-stack-check "specific" } */
-/* { dg-additional-options "-fstack-check -w" } */
+/* { dg-additional-options "-fpermissive -fstack-check -w" } */
 /* { dg-require-effective-target alloca } */
 
 int a;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20070815.c b/gcc/testsuite/gcc.dg/tree-ssa/20070815.c
index fa0e69f7cc4..52d646f8b2e 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/20070815.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20070815.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O -w" } */
+/* { dg-options "-fpermissive -O -w" } */
 
 /* This code snippet from glibc 2.3.5 was causing an ICE during
    optimization because we were failing to update the SSA form for
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-29.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-29.c
index d0f7db26391..4d73f14cb4a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-29.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-29.c
@@ -1,6 +1,6 @@
 /* PR middle-end/100732 - ICE on sprintf %s with integer argument
    { dg-do compile }
-   { dg-options "-O2 -Wall -fdump-tree-optimized" } */
+   { dg-options "-fpermissive -O2 -Wall -fdump-tree-optimized" } */
 
 #define sprintf(d, f, ...) \
   __builtin___sprintf_chk (d, 0, 32, f, __VA_ARGS__)
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtins-folding-gimple-ub.c b/gcc/testsuite/gcc.dg/tree-ssa/builtins-folding-gimple-ub.c
index 3946a8ca18c..944b4357bef 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtins-folding-gimple-ub.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtins-folding-gimple-ub.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-optimized" } */
+/* { dg-options "-fpermissive -O1 -fdump-tree-optimized" } */
 
 char *buffer1;
 char *buffer2;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr22051-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr22051-2.c
index 98114f3d422..11a805990ef 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr22051-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr22051-2.c
@@ -1,5 +1,5 @@
 /* { dg-do compile }  */
-/* { dg-options "-O2 -fdump-tree-optimized -w" }  */
+/* { dg-options "-fpermissive -O2 -fdump-tree-optimized -w" }  */
 
 void *arf ();
 int
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-10.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-10.c
index f97c57503ce..85633f13938 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-10.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-10.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O -w -fdump-tree-dse1-vops" } */
+/* { dg-options "-fpermissive -O -w -fdump-tree-dse1-vops" } */
 
 __extension__ typedef __SIZE_TYPE__ size_t;
 typedef struct _IO_FILE FILE;
diff --git a/gcc/testsuite/gcc.target/aarch64/pr60697.c b/gcc/testsuite/gcc.target/aarch64/pr60697.c
index 1b5857c1fbf..6fcd632234d 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr60697.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr60697.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-w -O3 -mcpu=cortex-a53" } */
+/* { dg-options "-fpermissive -w -O3 -mcpu=cortex-a53" } */
 typedef struct __sFILE __FILE;
 typedef __FILE FILE;
 typedef int atom_id;
diff --git a/gcc/testsuite/gcc.target/aarch64/pr87305.c b/gcc/testsuite/gcc.target/aarch64/pr87305.c
index 8beaa9176e0..7a3e41820d6 100644
--- a/gcc/testsuite/gcc.target/aarch64/pr87305.c
+++ b/gcc/testsuite/gcc.target/aarch64/pr87305.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Ofast -mbig-endian -w" } */
+/* { dg-options "-fpermissive -Ofast -mbig-endian -w" } */
 
 int cc;
 
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pr96357.c b/gcc/testsuite/gcc.target/aarch64/sve/pr96357.c
index e52867f5729..5d8fd8b53c3 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/pr96357.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pr96357.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O3 -march=armv8.2-a+sve" } */
+/* { dg-options "-fpermissive -O3 -march=armv8.2-a+sve" } */
 
 int d;
 
diff --git a/gcc/testsuite/gcc.target/i386/attr-nocf-check-1a.c b/gcc/testsuite/gcc.target/i386/attr-nocf-check-1a.c
index f2751e8c814..752a8a88480 100644
--- a/gcc/testsuite/gcc.target/i386/attr-nocf-check-1a.c
+++ b/gcc/testsuite/gcc.target/i386/attr-nocf-check-1a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-fcf-protection" } */
+/* { dg-options "-fpermissive -fcf-protection" } */
 
 int func (int) __attribute__ ((nocf_check));
 int (*fptr) (int) __attribute__ ((nocf_check));
diff --git a/gcc/testsuite/gcc.target/i386/attr-nocf-check-3a.c b/gcc/testsuite/gcc.target/i386/attr-nocf-check-3a.c
index 9924cdc80f0..da8b7ffe600 100644
--- a/gcc/testsuite/gcc.target/i386/attr-nocf-check-3a.c
+++ b/gcc/testsuite/gcc.target/i386/attr-nocf-check-3a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-fcf-protection" } */
+/* { dg-options "-fpermissive -fcf-protection" } */
 
 int  foo (void) __attribute__ ((nocf_check));
 void (*foo1) (void) __attribute__((nocf_check));
diff --git a/gcc/testsuite/gcc.target/i386/avx512bf16-pr108881.c b/gcc/testsuite/gcc.target/i386/avx512bf16-pr108881.c
index 50a7382ec96..99256e9e2aa 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bf16-pr108881.c
+++ b/gcc/testsuite/gcc.target/i386/avx512bf16-pr108881.c
@@ -1,6 +1,6 @@
 /* PR target/108881 */
 /* { dg-do compile } */
-/* { dg-options "-mavx512bf16 -mno-avx512vl" } */
+/* { dg-options "-fpermissive -mavx512bf16 -mno-avx512vl" } */
 
 typedef float __m256 __attribute__((__vector_size__(32)));
 typedef __bf16 __v16bf __attribute__((__vector_size__(32)));
diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-2a.c b/gcc/testsuite/gcc.target/i386/cet-notrack-2a.c
index 76b0e2d5611..2a70bc67fc0 100644
--- a/gcc/testsuite/gcc.target/i386/cet-notrack-2a.c
+++ b/gcc/testsuite/gcc.target/i386/cet-notrack-2a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O -fcf-protection" } */
+/* { dg-options "-fpermissive -O -fcf-protection" } */
 /* { dg-final { scan-assembler-times "endbr32" 1 { target ia32 } } } */
 /* { dg-final { scan-assembler-times "endbr64" 1 { target { ! ia32 } } } } */
 /* { dg-final { scan-assembler-times "notrack call\[ \t]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-2b.c b/gcc/testsuite/gcc.target/i386/cet-notrack-2b.c
index 8b4952d40bb..7ebf22a30d6 100644
--- a/gcc/testsuite/gcc.target/i386/cet-notrack-2b.c
+++ b/gcc/testsuite/gcc.target/i386/cet-notrack-2b.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fcf-protection" } */
+/* { dg-options "-fpermissive -O2 -fcf-protection" } */
 /* { dg-final { scan-assembler-times "endbr32" 1 { target ia32 } } } */
 /* { dg-final { scan-assembler-times "endbr64" 1 { target { ! ia32 } } } } */
 /* { dg-final { scan-assembler-times "notrack jmp\[ \t]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-5b.c b/gcc/testsuite/gcc.target/i386/cet-notrack-5b.c
index 255ad458a87..ed816bb9459 100644
--- a/gcc/testsuite/gcc.target/i386/cet-notrack-5b.c
+++ b/gcc/testsuite/gcc.target/i386/cet-notrack-5b.c
@@ -1,6 +1,6 @@
 /* Check the attribute do not proparate through assignment.  */
 /* { dg-do compile } */
-/* { dg-options "-O -fcf-protection" } */
+/* { dg-options "-fpermissive -O -fcf-protection" } */
 /* { dg-final { scan-assembler-times "endbr32" 1 { target ia32 } } } */
 /* { dg-final { scan-assembler-times "endbr64" 1 { target { ! ia32 } } } } */
 /* { dg-final { scan-assembler-times "\tcall\[ \t]+" 1 { target { ! ia32 } || { ! *-*-darwin* } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-6a.c b/gcc/testsuite/gcc.target/i386/cet-notrack-6a.c
index 8bbe6e48796..ae2a43a2459 100644
--- a/gcc/testsuite/gcc.target/i386/cet-notrack-6a.c
+++ b/gcc/testsuite/gcc.target/i386/cet-notrack-6a.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fcf-protection" } */
+/* { dg-options "-fpermissive -O2 -fcf-protection" } */
 /* { dg-final { scan-assembler-times "endbr32" 1 { target ia32 } } } */
 /* { dg-final { scan-assembler-times "endbr64" 1 { target { ! ia32 } } } } */
 /* { dg-final { scan-assembler-times "\t(?:call|jmp)\[ \t]+.*foo" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-6b.c b/gcc/testsuite/gcc.target/i386/cet-notrack-6b.c
index f950d3a8689..32766c36eab 100644
--- a/gcc/testsuite/gcc.target/i386/cet-notrack-6b.c
+++ b/gcc/testsuite/gcc.target/i386/cet-notrack-6b.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O0 -fcf-protection" } */
+/* { dg-options "-fpermissive -O0 -fcf-protection" } */
 /* { dg-final { scan-assembler-times "endbr32" 1 { target ia32 } } } */
 /* { dg-final { scan-assembler-times "endbr64" 1 { target { ! ia32 } } } } */
 /* { dg-final { scan-assembler-not "\tcall\[ \t]+" { target { ! ia32 } || { ! *-*-darwin* } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr70325.c b/gcc/testsuite/gcc.target/i386/pr70325.c
index e2b9342658c..8b307399333 100644
--- a/gcc/testsuite/gcc.target/i386/pr70325.c
+++ b/gcc/testsuite/gcc.target/i386/pr70325.c
@@ -1,6 +1,6 @@
 /* PR target/70325 */
 /* { dg-do compile } */
-/* { dg-options "-mavx512vl -O2" } */
+/* { dg-options "-fpermissive -mavx512vl -O2" } */
 
 typedef char C __attribute((__vector_size__(32)));
 typedef int I __attribute((__vector_size__(32)));
diff --git a/gcc/testsuite/gcc.target/i386/pr70858.c b/gcc/testsuite/gcc.target/i386/pr70858.c
index 99d7877346c..dcba4cc2c7d 100644
--- a/gcc/testsuite/gcc.target/i386/pr70858.c
+++ b/gcc/testsuite/gcc.target/i386/pr70858.c
@@ -1,6 +1,6 @@
 /* PR target/70858 */
 /* { dg-do compile } */
-/* { dg-options "-O2 -mlwp -mbmi -mtbm -mbmi2 -std=gnu11" } */
+/* { dg-options "-fpermissive -O2 -mlwp -mbmi -mtbm -mbmi2 -std=gnu11" } */
 
 void
 f1 (unsigned long long x, unsigned int y)
diff --git a/gcc/testsuite/gcc.target/i386/pr83488.c b/gcc/testsuite/gcc.target/i386/pr83488.c
index e5ca770e5cc..31060f32759 100644
--- a/gcc/testsuite/gcc.target/i386/pr83488.c
+++ b/gcc/testsuite/gcc.target/i386/pr83488.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mavx512vbmi2 -mno-avx512f" } */
+/* { dg-options "-fpermissive -mavx512vbmi2 -mno-avx512f" } */
 
 typedef long long __v8di __attribute__((vector_size (64)));
 void
diff --git a/gcc/testsuite/gcc.target/i386/pr85511.c b/gcc/testsuite/gcc.target/i386/pr85511.c
index a082a5eaf01..39457aa46b4 100644
--- a/gcc/testsuite/gcc.target/i386/pr85511.c
+++ b/gcc/testsuite/gcc.target/i386/pr85511.c
@@ -1,6 +1,6 @@
 /* PR target/85511 */
 /* { dg-do compile } */
-/* { dg-options "-Wimplicit-function-declaration" } */
+/* { dg-options "-fpermissive -Wimplicit-function-declaration" } */
 
 unsigned int
 foo (void)
diff --git a/gcc/testsuite/gcc.target/i386/pr87572.c b/gcc/testsuite/gcc.target/i386/pr87572.c
index ea1beb78f5c..76882e9161f 100644
--- a/gcc/testsuite/gcc.target/i386/pr87572.c
+++ b/gcc/testsuite/gcc.target/i386/pr87572.c
@@ -1,6 +1,6 @@
 /* PR target/82483 */
 /* { dg-do compile } */
-/* { dg-options "-O2 -mavx512ifma -mno-sse2 -w -Wno-psabi" } */
+/* { dg-options "-fpermissive -O2 -mavx512ifma -mno-sse2 -w -Wno-psabi" } */
 
 typedef long long __m512i __attribute__((__vector_size__(64)));
 __m512i
diff --git a/gcc/testsuite/gcc.target/i386/pr88195.c b/gcc/testsuite/gcc.target/i386/pr88195.c
index cd12adc063a..863647c9af0 100644
--- a/gcc/testsuite/gcc.target/i386/pr88195.c
+++ b/gcc/testsuite/gcc.target/i386/pr88195.c
@@ -1,5 +1,5 @@
 /* PR target/88195 */
-/* { dg-options "-mptwrite" } */
+/* { dg-options "-fpermissive -mptwrite" } */
 
 void
 foo (void)
