]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
compat.exp (compat-get-options-main, [...]): Handle dg-prune-output in source file.
authorJakub Jelinek <jakub@redhat.com>
Thu, 19 Mar 2009 22:10:22 +0000 (23:10 +0100)
committerJanis Johnson <janis@gcc.gnu.org>
Thu, 19 Mar 2009 22:10:22 +0000 (22:10 +0000)
2009-03-19  Jakub Jelinek  <jakub@redhat.com>
    Janis Johnson  <janis187@us.ibm.com>

* lib/compat.exp (compat-get-options-main, compat-get-options):
Handle dg-prune-output in source file.
* lib/gcc-defs.exp (${tool}_check_compile): Process prune requests.
* gcc.dg/compat/struct-layout-1_main.c: Use dg-prune for warning.
* gcc.dg/compat/struct-layout-1_generate.c: Use -Wno-abi, prune
two warnings.

Co-Authored-By: Janis Johnson <janis187@us.ibm.com>
From-SVN: r144971

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
gcc/testsuite/gcc.dg/compat/struct-layout-1_main.c
gcc/testsuite/lib/compat.exp
gcc/testsuite/lib/gcc-defs.exp

index 6f5dfa92b979ae5903ca598baa8cb1d49a5e2354..c7c1e583fbb8d8d8ca763d746ba37844ae156021 100644 (file)
@@ -1,3 +1,13 @@
+2009-03-19  Jakub Jelinek  <jakub@redhat.com>
+           Janis Johnson  <janis187@us.ibm.com>
+
+       * lib/compat.exp (compat-get-options-main, compat-get-options):
+       Handle dg-prune-output in source file.
+       * lib/gcc-defs.exp (${tool}_check_compile): Process prune requests.
+       * gcc.dg/compat/struct-layout-1_main.c: Use dg-prune for warning.
+       * gcc.dg/compat/struct-layout-1_generate.c: Use -Wno-abi, prune
+       two warnings.
+
 2009-03-19  Jakub Jelinek  <jakub@redhat.com>
 
        PR c/39495
index 2e2943dd513e55490fb3a4fd78bbf1cf98deafca..f563c2774bd23f80f4c99f56fcd315662f7ad84e 100644 (file)
@@ -44,6 +44,7 @@ along with GCC; see the file COPYING3.  If not see
 
 const char *dg_options[] = {
 "/* { dg-options \"%s-I%s\" } */\n",
+"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
 "/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
 "/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
 "/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* } } */\n",
@@ -789,6 +790,8 @@ switchfiles (int fields)
   fprintf (outfile, "/* { dg-require-effective-target int32plus } */\n");
   for (i = 0; i < NDG_OPTIONS; i++)
     fprintf (outfile, dg_options[i], "", srcdir_safe);
+  fprintf (outfile, "/* { dg-prune-output \".*-Wno-abi.*\" } */\n");
+  fprintf (outfile, "/* { dg-prune-output \".*Offset of packed bit-field.*\" } */\n");
   fprintf (outfile, "\
 #include \"struct-layout-1.h\"\n\
 \n\
index 0a2fb42c79247365adc30a094a2b64727b5a70fd..b59453e0b1075f3f2c7a048ef1a33dfa5a71c60e 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-prune-output ".*-Wno-abi.*" } */
+
 #include "struct-layout-1.h"
 
 #define TX(n, type, attrs, fields, ops) extern void test##n (void);
index 049e5a2327088b87d2f9de866e515d9d5bd55bca..a4ec3601e562aad0225b14e894085e86c66a44b3 100644 (file)
@@ -170,6 +170,7 @@ proc compat-get-options-main { src } {
     foreach op $tmp {
        set cmd [lindex $op 0]
        if { ![string compare "dg-options" $cmd] \
+            || [string match "dg-prune-output" $cmd] \
             || [string match "dg-skip-if" $cmd] \
             || [string match "dg-require-*" $cmd]  } {
            set status [catch "$op" errmsg]
@@ -215,6 +216,7 @@ proc compat-get-options { src } {
     foreach op $tmp {
        set cmd [lindex $op 0]
        if { ![string compare "dg-options" $cmd] \
+            || ![string compare "dg-prune-output" $cmd] \
             || ![string compare "dg-xfail-if" $cmd] } {
            set status [catch "$op" errmsg]
            if { $status != 0 } {
index 0570f41e6d71784c4ef4b3a2646a2f5a9c93a858..7bcbcabc0878bc1b39d3597588ce3944214696f8 100644 (file)
@@ -49,6 +49,11 @@ proc ${tool}_check_compile {testcase option objname gcc_output} {
 
     set gcc_output [prune_warnings $gcc_output]
 
+    if { [info proc ${tool}-dg-prune] != "" } {
+       global target_triplet
+       set gcc_output [${tool}-dg-prune $target_triplet $gcc_output]
+    }
+
     set unsupported_message [${tool}_check_unsupported_p $gcc_output]
     if { $unsupported_message != "" } {
        unsupported "$testcase: $unsupported_message"