aboutsummaryrefslogtreecommitdiff
blob: 3b9583dcbbd3df746ae1aaa230e7f352c990f0a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
--- a/gcc/testsuite/gcc.dg/charset/builtin2.c
+++ b/gcc/testsuite/gcc.dg/charset/builtin2.c
@@ -4,6 +4,7 @@
 /* { dg-do compile } */
 /* { dg-require-iconv "IBM1047" } */
 /* { dg-options "-O2 -fexec-charset=IBM1047" } */
+/* { dg-additional-options "-Wno-format" { target espf } } */
 /* { dg-final { scan-assembler-not "printf" } } */
 /* { dg-final { scan-assembler-not "fprintf" } } */
 /* { dg-final { scan-assembler-not "sprintf" } } */
--- a/gcc/testsuite/gcc.dg/format/format.exp
+++ b/gcc/testsuite/gcc.dg/format/format.exp
@@ -24,9 +24,16 @@ if [is_remote host] {
 
 load_lib gcc-dg.exp
 load_lib torture-options.exp
+load_lib target-supports.exp
 
 torture-init
-set-torture-options [list { } { -DWIDE } ]
+
+# Disable -Wformat if we use espf.
+if  [check_effective_target_espf] {
+	set-torture-options [list { -Wno-format } { -DWIDE -Wno-format } ]
+} else {
+	set-torture-options [list { } { -DWIDE } ]
+}
 
 dg-init
 gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] ""

--- a/gcc/testsuite/gcc.dg/pr30473.c
+++ b/gcc/testsuite/gcc.dg/pr30473.c
@@ -2,6 +2,7 @@
 /* Make sure this doesn't ICE.  */
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
+/* { dg-additional-options "Wno-format" { target espf } } */
 
 extern int sprintf (char *, const char *, ...);
 
--- a/gcc/testsuite/gcc.dg/pr38902.c
+++ b/gcc/testsuite/gcc.dg/pr38902.c
@@ -2,6 +2,7 @@
 /* { dg-do run } */
 /* { dg-options "-O2 -fstack-protector" } */
 /* { dg-require-effective-target fstack_protector } */
+/* { dg-additional-options "Wno-format" { target espf } } */
 
 #ifdef DEBUG
 #include <stdio.h>
--- a/gcc/testsuite/gcc.dg/ipa/ipa-sra-1.c	2010-09-10 01:38:23.000000000 +0200
+++b/gcc/testsuite/gcc.dg/ipa/ipa-sra-1.c	2012-07-31 14:37:53.238554197 +0200
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2 -fipa-sra -fdump-tree-eipa_sra-details"  } */
+/* { dg-additional-options "-Wno-format" { target espf } } */
 
 struct bovid
 {
--- a/gcc/testsuite/gcc.dg/torture/tls/tls-test.c	2011-06-22 19:27:07.000000000 +0200
+++ b/gcc/testsuite/gcc.dg/torture/tls/tls-test.c	2012-07-31 14:40:00.411552986 +0200
@@ -1,7 +1,8 @@
 /* { dg-require-effective-target tls  }  */
 /* { dg-require-effective-target pthread } */
 /* { dg-options "-pthread" } */
+/* { dg-additional-options "-Wno-format" { target espf } } */
 
 #include <pthread.h>
 extern int printf (char *,...);
--- a/gcc/testsuite/g++.dg/abi/pragma-pack1.C	2011-06-07 23:54:07.000000000 +0200
+++ b/gcc/testsuite/g++.dg/abi/pragma-pack1.C	2012-08-16 17:49:19.472877085 +0200
@@ -1,4 +1,5 @@
 // PR c++/7046
+// { dg-additional-options "-Wno-format" { target espf } }
 
 extern "C" int printf (const char *, ...);
 
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-tuple.C	2012-08-16 17:41:19.486862781 +0200
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-tuple.C	2012-08-16 17:38:38.000000000 +0200
@@ -1,5 +1,6 @@
 // PR c++/53202
 // { dg-do run { target c++11 } }
+// { dg-additional-options "-Wno-format" { target espf } }
 
 #include <tuple>