]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: fix broken dg directives
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 26 Mar 2025 21:39:32 +0000 (17:39 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 26 Mar 2025 21:39:32 +0000 (17:39 -0400)
Found by dg-lint.

gcc/testsuite/ChangeLog:
* gcc.dg/ipa/pr110377.c: Fix missing trailing " }" in dg-do
directive.
* gcc.dg/plugin/infoleak-1.c: Fix dg-bogus directive.
* gcc.dg/pr101364-1.c: Fix missing trailing " }" in dg-options
directive.
* gcc.dg/pr113207.c: Fix dg-do.
* gcc.dg/sarif-output/include-chain-2.c: Fix ordering of dg-do
and dg-require-effective-target.
* gcc.dg/strub-pr118007.c: Likewise.
* gcc.dg/tanhbysinh.c: Fix missing whitespace after opening
brace and before closing brace in 6 dg-final directives.
* gcc.dg/uninit-pred-3_c.c: Fix missing whitespace after opening
brace in 6 dg-final directive.
* gcc.dg/uninit-pred-3_d.c: Likewise.
* gcc.dg/variable-sized-type-flex-array.c: Fix missing space
between dg-bogus and message in 2 places.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/testsuite/gcc.dg/ipa/pr110377.c
gcc/testsuite/gcc.dg/plugin/infoleak-1.c
gcc/testsuite/gcc.dg/pr101364-1.c
gcc/testsuite/gcc.dg/pr113207.c
gcc/testsuite/gcc.dg/sarif-output/include-chain-2.c
gcc/testsuite/gcc.dg/strub-pr118007.c
gcc/testsuite/gcc.dg/tanhbysinh.c
gcc/testsuite/gcc.dg/uninit-pred-3_c.c
gcc/testsuite/gcc.dg/uninit-pred-3_d.c
gcc/testsuite/gcc.dg/variable-sized-type-flex-array.c

index 63120a97bd0c2c2d16fd9362425c2a3c3efc5a38..76faef5e74ec973c8ec375651d983cc7bc099747 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-do compile */
+/* { dg-do compile */
 /* { dg-options "-O2 -fdump-ipa-cp" } */
 int test3(int);
 __attribute__ ((noinline))
index 4c5a86aeb0aade5e5cbbb60c1671452f7d3f05c6..07e3101a8367022a6156bff4ddbb4c7b2176e00f 100644 (file)
@@ -69,7 +69,7 @@ void test_2d (void __user *dst, u32 a)
 {
   struct s2 s = {0};
   s.i = a;
-  copy_to_user(dst, &s, sizeof (struct s2)); /* { dg-bogus" } */
+  copy_to_user(dst, &s, sizeof (struct s2)); /* { dg-bogus "" } */
 }
 
 struct empty {};
index e7c94a05553cdeeeb2d27172a560085335054aae..c2e32114179837e281b72cb166c49658a2014712 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-std=c90 "} */
+/* { dg-options "-std=c90} */
 
 void fruit(); /* { dg-message "previous declaration" } */
 void fruit( /* { dg-error "conflicting types for" } */
index 81f53d8fcc2f65b962f40dfe5cad6c673d5fdc7c..a8bc80d964d4a0d44af4690f69366979ed022208 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-compile } */
+/* { dg-do compile } */
 /* { dg-require-effective-target lto } */
 /* { dg-options "-flto -fchecking" }  */
 
index d5e3b0cbf47242c961ea46c855de4b39b43518dc..643a709f4e8dee43af5d6cd72f7ef0f78300f63d 100644 (file)
@@ -1,6 +1,6 @@
+/* { dg-do compile } */
 /* { dg-require-effective-target analyzer } */
 /* { dg-options "-fanalyzer -fdiagnostics-format=sarif-file" } */
-/* { dg-do compile } */
 
 /* Verify that SARIF output can capture chains of include files in
    diagnostic paths within result locations.
index 51f48245b3f2d36a24756b939a75697471d99f00..92cd31ebd1f3554b83924ccf2461f25522d648fe 100644 (file)
@@ -1,5 +1,5 @@
-/* { dg-require-effective-target strub } */
 /* { dg-do compile } */
+/* { dg-require-effective-target strub } */
 /* { dg-options "-fstrub=all -O2" } */
 
 void rb_ec_error_print(struct rb_execution_context_struct *volatile) {}        /* { dg-warning "declared inside parameter list" } */
index 9dbe133ec7495f3844954a97fc4eeff9a7c16e84..74fdd52b2086bcaf5a7a57bb91d4ec033c7d3ede 100644 (file)
@@ -30,12 +30,12 @@ tanhbysinhl_ (long double x)
 
 /* There must be no calls to sinh or atanh */
 /* There must be calls to cosh */
-/* {dg-final { scan-tree-dump-not "sinh " "optimized" } } */
-/* {dg-final { scan-tree-dump-not "tanh " "optimized" }} */
-/* {dg-final { scan-tree-dump-not "sinhf " "optimized" } } */
-/* {dg-final { scan-tree-dump-not "tanhf " "optimized" }} */
-/* {dg-final { scan-tree-dump-not "sinhl " "optimized" } } */
-/* {dg-final { scan-tree-dump-not "tanhl " "optimized" }} */
+/* { dg-final { scan-tree-dump-not "sinh " "optimized" } } */
+/* { dg-final { scan-tree-dump-not "tanh " "optimized" } } */
+/* { dg-final { scan-tree-dump-not "sinhf " "optimized" } } */
+/* { dg-final { scan-tree-dump-not "tanhf " "optimized" } } */
+/* { dg-final { scan-tree-dump-not "sinhl " "optimized" } } */
+/* { dg-final { scan-tree-dump-not "tanhl " "optimized" } } */
 /* { dg-final { scan-tree-dump "cosh " "optimized" } } */
 /* { dg-final { scan-tree-dump "coshf " "optimized" } } */
 /* { dg-final { scan-tree-dump "coshl " "optimized" } } */
index 1309790786c38eeec9f98dba28aacb0029c337b8..2125448fcf1aacb659bdff67f1a195edd3362ce1 100644 (file)
@@ -23,6 +23,6 @@ int foo (int n, int m, int r)
 
   if (r > 0)
     if (flag < 0)
-      blah(v); /* {dg-bogus "uninitialized" "bogus warning" } */
+      blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
   return 0;
 }
index 9f938763caade0580f76683d68c7f9a748de4c24..272e46bc015c622cdf6055275ce043c4b575dc06 100644 (file)
@@ -23,6 +23,6 @@ int foo (int n, int m, int r)
 
   if (r > 0)
     if (flag  == -1)
-      blah(v); /* {dg-bogus "uninitialized" "bogus warning" } */
+      blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
   return 0;
 }
index 3924937bad49d72c9650f3deee78cacd67ff121e..2267af55fd6f225a28ebc48f612fb97f55864cf2 100644 (file)
@@ -26,6 +26,6 @@ union flex_union_mid1 { int a; struct outer_flex_mid1 b; }; /* { dg-bogus "struc
 
 struct flexn { int n; int data[8]; }; 
 struct out_flex_endn { int m; struct flexn flex_data; }; /* { dg-bogus "structure containing a flexible array member is not at the end of another structure" } */
-struct out_flex_midn { struct flexn flex_data; int m; }; /* { dg-bogus"structure containing a flexible array member is not at the end of another structure" } */ 
-struct outer_flex_midn { struct out_flex_midn out_flex_data; int p; }; /* { dg-bogus"structure containing a flexible array member is not at the end of another structure" } */
+struct out_flex_midn { struct flexn flex_data; int m; }; /* { dg-bogus "structure containing a flexible array member is not at the end of another structure" } */ 
+struct outer_flex_midn { struct out_flex_midn out_flex_data; int p; }; /* { dg-bogus "structure containing a flexible array member is not at the end of another structure" } */
 union flex_union_midn { int a; struct outer_flex_midn b; }; /* { dg-bogus "structure containing a flexible array member is not at the end of another structure" } */