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
|
# DP: Reliably prune GCC notes in C++ compat suite
in testing the rs6000 ABI patches I noted a weird effect: usually, the
-Wpsabi warning notes are ignored in the compat test suites, so we get
a clean test run anyway.
However, when running the C++ version of the struct-layout-1.exp case
*alone* (using RUNTESTFLAGS=struct-layout-1.exp), suddenly tests are
failing because of those extra notes. This does *not* happen with
the C version of that suite ...
It turns out that that pruning those notes is supposed to happen
from within gcc-defs.exp:${tool}_check_compile:
if { [info proc ${tool}-dg-prune] != "" } {
global target_triplet
set gcc_output [${tool}-dg-prune $target_triplet $gcc_output]
}
However, the g++-dg-prune routine is defined in g++-dg.exp, which
is never included from g++.dg/compat/struct-layout-1.exp (directly
or indirectly). Now, when running the full suite, that file would
have been loaded by some earlier g++.dg .exp file, so everything
works out. But when running struct-layout-1.exp stand-alone, the
g++-dg-prune routine is never defined and thus silently no pruning
takes place.
To fix this, the following patch simply loads g++-dg.exp directly
from g++.dg/compat/struct-layout-1.exp.
Tested on powerpc64-linux and powerpc64le-linux.
OK for mainline (and 4.8/4.9 once the rs6000 ABI patches are
backported there)?
Bye,
Ulrich
gcc/testsuite/ChangeLog:
* g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp
--- a/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
+++ b/src/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
@@ -89,6 +89,9 @@ proc compat-use-tst-compiler { } {
# This must be done after the compat-use-*-compiler definitions.
load_lib compat.exp
+# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
+load_lib g++-dg.exp
+
g++_init
# Save variables for the C++ compiler under test, which each test will
|