aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/gcc.dg/pch/common-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/common-1.hs (renamed from gcc/testsuite/gcc.dg/pch/common-1.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/cpp-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/cpp-1.hs (renamed from gcc/testsuite/gcc.dg/pch/cpp-1.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/cpp-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/cpp-2.hs (renamed from gcc/testsuite/gcc.dg/pch/cpp-2.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/decl-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/decl-1.hs (renamed from gcc/testsuite/gcc.dg/pch/decl-1.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/decl-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/decl-2.hs (renamed from gcc/testsuite/gcc.dg/pch/decl-2.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/decl-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/decl-3.hs (renamed from gcc/testsuite/gcc.dg/pch/decl-3.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/decl-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/decl-4.hs (renamed from gcc/testsuite/gcc.dg/pch/decl-4.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/decl-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/decl-5.hs (renamed from gcc/testsuite/gcc.dg/pch/decl-5.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/empty.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/empty.hs (renamed from gcc/testsuite/gcc.dg/pch/empty.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/except-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/except-1.hs (renamed from gcc/testsuite/gcc.dg/pch/except-1.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/global-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/global-1.hs (renamed from gcc/testsuite/gcc.dg/pch/global-1.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/inline-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/inline-1.hs (renamed from gcc/testsuite/gcc.dg/pch/inline-1.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/inline-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/inline-2.hs (renamed from gcc/testsuite/gcc.dg/pch/inline-2.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/macro-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/macro-1.hs (renamed from gcc/testsuite/gcc.dg/pch/macro-1.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/macro-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/macro-2.hs (renamed from gcc/testsuite/gcc.dg/pch/macro-2.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/macro-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/macro-3.hs (renamed from gcc/testsuite/gcc.dg/pch/macro-3.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/pch.exp24
-rw-r--r--gcc/testsuite/gcc.dg/pch/static-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/static-1.hs (renamed from gcc/testsuite/gcc.dg/pch/static-1.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/static-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/static-2.hs (renamed from gcc/testsuite/gcc.dg/pch/static-2.h)0
-rw-r--r--gcc/testsuite/gcc.dg/pch/system-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/system-1.hs (renamed from gcc/testsuite/gcc.dg/pch/system-1.h)0
40 files changed, 34 insertions, 35 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 55e4028..c4f0062 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2003-01-16 Richard Henderson <rth@redhat.com>
+
+ * gcc.dg/pch/pch.exp: Copy test header to the working directory
+ before using it either for precompilation or direct use.
+ * gcc.dg/pch/*.hs: Rename from gcc.dg/pch/*.h.
+ * gcc.dg/pch/*.c: Include foo.h, not foo.hp.
+
2003-01-16 Mark Mitchell <mark@codesourcery.com>
* gcc/testsuite/g++.dg/ext/typename1.C: Add typename keyword.
diff --git a/gcc/testsuite/gcc.dg/pch/common-1.c b/gcc/testsuite/gcc.dg/pch/common-1.c
index dcf148a..ec57310 100644
--- a/gcc/testsuite/gcc.dg/pch/common-1.c
+++ b/gcc/testsuite/gcc.dg/pch/common-1.c
@@ -1,3 +1,3 @@
-#include "common-1.hp"
+#include "common-1.h"
int foo2 = 3;
int zz = 2;
diff --git a/gcc/testsuite/gcc.dg/pch/common-1.h b/gcc/testsuite/gcc.dg/pch/common-1.hs
index 971e199..971e199 100644
--- a/gcc/testsuite/gcc.dg/pch/common-1.h
+++ b/gcc/testsuite/gcc.dg/pch/common-1.hs
diff --git a/gcc/testsuite/gcc.dg/pch/cpp-1.c b/gcc/testsuite/gcc.dg/pch/cpp-1.c
index 43256ca..9a3d670 100644
--- a/gcc/testsuite/gcc.dg/pch/cpp-1.c
+++ b/gcc/testsuite/gcc.dg/pch/cpp-1.c
@@ -1,4 +1,4 @@
-#include "cpp-1.hp"
+#include "cpp-1.h"
#if !defined(__GNUC__)
panic! panic!
#endif
diff --git a/gcc/testsuite/gcc.dg/pch/cpp-1.h b/gcc/testsuite/gcc.dg/pch/cpp-1.hs
index 6e25b02..6e25b02 100644
--- a/gcc/testsuite/gcc.dg/pch/cpp-1.h
+++ b/gcc/testsuite/gcc.dg/pch/cpp-1.hs
diff --git a/gcc/testsuite/gcc.dg/pch/cpp-2.c b/gcc/testsuite/gcc.dg/pch/cpp-2.c
index b76c22c..aab8411 100644
--- a/gcc/testsuite/gcc.dg/pch/cpp-2.c
+++ b/gcc/testsuite/gcc.dg/pch/cpp-2.c
@@ -1,4 +1,4 @@
/* { dg-options "-Wunknown-pragmas -I." } */
-#include "cpp-2.hp"
+#include "cpp-2.h"
#pragma GCC poison not_used
diff --git a/gcc/testsuite/gcc.dg/pch/cpp-2.h b/gcc/testsuite/gcc.dg/pch/cpp-2.hs
index 6e25b02..6e25b02 100644
--- a/gcc/testsuite/gcc.dg/pch/cpp-2.h
+++ b/gcc/testsuite/gcc.dg/pch/cpp-2.hs
diff --git a/gcc/testsuite/gcc.dg/pch/decl-1.c b/gcc/testsuite/gcc.dg/pch/decl-1.c
index e412070..5d6bb1d 100644
--- a/gcc/testsuite/gcc.dg/pch/decl-1.c
+++ b/gcc/testsuite/gcc.dg/pch/decl-1.c
@@ -1,2 +1,2 @@
-#include "decl-1.hp"
+#include "decl-1.h"
int main(void) { return foo; }
diff --git a/gcc/testsuite/gcc.dg/pch/decl-1.h b/gcc/testsuite/gcc.dg/pch/decl-1.hs
index 399f5d3..399f5d3 100644
--- a/gcc/testsuite/gcc.dg/pch/decl-1.h
+++ b/gcc/testsuite/gcc.dg/pch/decl-1.hs
diff --git a/gcc/testsuite/gcc.dg/pch/decl-2.c b/gcc/testsuite/gcc.dg/pch/decl-2.c
index c374a17..72b6538 100644
--- a/gcc/testsuite/gcc.dg/pch/decl-2.c
+++ b/gcc/testsuite/gcc.dg/pch/decl-2.c
@@ -1,2 +1,2 @@
-#include "decl-2.hp"
+#include "decl-2.h"
int main(void) { return fun (1, 2); }
diff --git a/gcc/testsuite/gcc.dg/pch/decl-2.h b/gcc/testsuite/gcc.dg/pch/decl-2.hs
index 99c3726..99c3726 100644
--- a/gcc/testsuite/gcc.dg/pch/decl-2.h
+++ b/gcc/testsuite/gcc.dg/pch/decl-2.hs
diff --git a/gcc/testsuite/gcc.dg/pch/decl-3.c b/gcc/testsuite/gcc.dg/pch/decl-3.c
index 9c95b9a..c12abbb 100644
--- a/gcc/testsuite/gcc.dg/pch/decl-3.c
+++ b/gcc/testsuite/gcc.dg/pch/decl-3.c
@@ -1,4 +1,4 @@
-#include "decl-3.hp"
+#include "decl-3.h"
foo_p bar (void)
{
diff --git a/gcc/testsuite/gcc.dg/pch/decl-3.h b/gcc/testsuite/gcc.dg/pch/decl-3.hs
index 787d480..787d480 100644
--- a/gcc/testsuite/gcc.dg/pch/decl-3.h
+++ b/gcc/testsuite/gcc.dg/pch/decl-3.hs
diff --git a/gcc/testsuite/gcc.dg/pch/decl-4.c b/gcc/testsuite/gcc.dg/pch/decl-4.c
index 3efe382..61affdb 100644
--- a/gcc/testsuite/gcc.dg/pch/decl-4.c
+++ b/gcc/testsuite/gcc.dg/pch/decl-4.c
@@ -1,4 +1,4 @@
-#include "decl-4.hp"
+#include "decl-4.h"
int bar (foo_p f)
{
diff --git a/gcc/testsuite/gcc.dg/pch/decl-4.h b/gcc/testsuite/gcc.dg/pch/decl-4.hs
index 3fb2200..3fb2200 100644
--- a/gcc/testsuite/gcc.dg/pch/decl-4.h
+++ b/gcc/testsuite/gcc.dg/pch/decl-4.hs
diff --git a/gcc/testsuite/gcc.dg/pch/decl-5.c b/gcc/testsuite/gcc.dg/pch/decl-5.c
index f94b33a..705c2fe 100644
--- a/gcc/testsuite/gcc.dg/pch/decl-5.c
+++ b/gcc/testsuite/gcc.dg/pch/decl-5.c
@@ -1,2 +1,2 @@
-#include "decl-5.hp"
+#include "decl-5.h"
static int (*t)(void) = foo;
diff --git a/gcc/testsuite/gcc.dg/pch/decl-5.h b/gcc/testsuite/gcc.dg/pch/decl-5.hs
index 914983c..914983c 100644
--- a/gcc/testsuite/gcc.dg/pch/decl-5.h
+++ b/gcc/testsuite/gcc.dg/pch/decl-5.hs
diff --git a/gcc/testsuite/gcc.dg/pch/empty.c b/gcc/testsuite/gcc.dg/pch/empty.c
index 330876c..7daa7ca 100644
--- a/gcc/testsuite/gcc.dg/pch/empty.c
+++ b/gcc/testsuite/gcc.dg/pch/empty.c
@@ -1,6 +1,6 @@
/* Yes, it's called "empty" because it has no contents at all.
Even this comment goes here, rather than in empty.h. */
-#include "empty.hp"
+#include "empty.h"
int main(void)
{
diff --git a/gcc/testsuite/gcc.dg/pch/empty.h b/gcc/testsuite/gcc.dg/pch/empty.hs
index e69de29..e69de29 100644
--- a/gcc/testsuite/gcc.dg/pch/empty.h
+++ b/gcc/testsuite/gcc.dg/pch/empty.hs
diff --git a/gcc/testsuite/gcc.dg/pch/except-1.c b/gcc/testsuite/gcc.dg/pch/except-1.c
index 0332609..f81b098 100644
--- a/gcc/testsuite/gcc.dg/pch/except-1.c
+++ b/gcc/testsuite/gcc.dg/pch/except-1.c
@@ -1,5 +1,5 @@
/* { dg-options "-fexceptions -I." } */
-#include "except-1.hp"
+#include "except-1.h"
int main(void)
{
diff --git a/gcc/testsuite/gcc.dg/pch/except-1.h b/gcc/testsuite/gcc.dg/pch/except-1.hs
index 33a893d..33a893d 100644
--- a/gcc/testsuite/gcc.dg/pch/except-1.h
+++ b/gcc/testsuite/gcc.dg/pch/except-1.hs
diff --git a/gcc/testsuite/gcc.dg/pch/global-1.c b/gcc/testsuite/gcc.dg/pch/global-1.c
index 4cab062..c1cff5f 100644
--- a/gcc/testsuite/gcc.dg/pch/global-1.c
+++ b/gcc/testsuite/gcc.dg/pch/global-1.c
@@ -1,2 +1,2 @@
-#include "global-1.hp"
+#include "global-1.h"
const int bar = 3;
diff --git a/gcc/testsuite/gcc.dg/pch/global-1.h b/gcc/testsuite/gcc.dg/pch/global-1.hs
index 26efffc..26efffc 100644
--- a/gcc/testsuite/gcc.dg/pch/global-1.h
+++ b/gcc/testsuite/gcc.dg/pch/global-1.hs
diff --git a/gcc/testsuite/gcc.dg/pch/inline-1.c b/gcc/testsuite/gcc.dg/pch/inline-1.c
index 7fc32d7..38fad39 100644
--- a/gcc/testsuite/gcc.dg/pch/inline-1.c
+++ b/gcc/testsuite/gcc.dg/pch/inline-1.c
@@ -1,4 +1,4 @@
-#include "inline-1.hp"
+#include "inline-1.h"
int bar(int a, int b)
{
return foo(a) + b;
diff --git a/gcc/testsuite/gcc.dg/pch/inline-1.h b/gcc/testsuite/gcc.dg/pch/inline-1.hs
index e8f1d6f..e8f1d6f 100644
--- a/gcc/testsuite/gcc.dg/pch/inline-1.h
+++ b/gcc/testsuite/gcc.dg/pch/inline-1.hs
diff --git a/gcc/testsuite/gcc.dg/pch/inline-2.c b/gcc/testsuite/gcc.dg/pch/inline-2.c
index 7792c82..59b238a 100644
--- a/gcc/testsuite/gcc.dg/pch/inline-2.c
+++ b/gcc/testsuite/gcc.dg/pch/inline-2.c
@@ -1,4 +1,4 @@
-#include "inline-2.hp"
+#include "inline-2.h"
extern inline char
bar(int a)
{
diff --git a/gcc/testsuite/gcc.dg/pch/inline-2.h b/gcc/testsuite/gcc.dg/pch/inline-2.hs
index 7d90c63..7d90c63 100644
--- a/gcc/testsuite/gcc.dg/pch/inline-2.h
+++ b/gcc/testsuite/gcc.dg/pch/inline-2.hs
diff --git a/gcc/testsuite/gcc.dg/pch/macro-1.c b/gcc/testsuite/gcc.dg/pch/macro-1.c
index 3775004..70546bb 100644
--- a/gcc/testsuite/gcc.dg/pch/macro-1.c
+++ b/gcc/testsuite/gcc.dg/pch/macro-1.c
@@ -1,4 +1,4 @@
-#include "macro-1.hp"
+#include "macro-1.h"
int main(void)
{
diff --git a/gcc/testsuite/gcc.dg/pch/macro-1.h b/gcc/testsuite/gcc.dg/pch/macro-1.hs
index 5d5b3f4..5d5b3f4 100644
--- a/gcc/testsuite/gcc.dg/pch/macro-1.h
+++ b/gcc/testsuite/gcc.dg/pch/macro-1.hs
diff --git a/gcc/testsuite/gcc.dg/pch/macro-2.c b/gcc/testsuite/gcc.dg/pch/macro-2.c
index d058e2b..e2d965f 100644
--- a/gcc/testsuite/gcc.dg/pch/macro-2.c
+++ b/gcc/testsuite/gcc.dg/pch/macro-2.c
@@ -1,6 +1,6 @@
#define DEFINED_VALUE_2 3
-#include "macro-2.hp"
+#include "macro-2.h"
int main(void)
{
diff --git a/gcc/testsuite/gcc.dg/pch/macro-2.h b/gcc/testsuite/gcc.dg/pch/macro-2.hs
index 6152a84..6152a84 100644
--- a/gcc/testsuite/gcc.dg/pch/macro-2.h
+++ b/gcc/testsuite/gcc.dg/pch/macro-2.hs
diff --git a/gcc/testsuite/gcc.dg/pch/macro-3.c b/gcc/testsuite/gcc.dg/pch/macro-3.c
index 40ee46e..493d954 100644
--- a/gcc/testsuite/gcc.dg/pch/macro-3.c
+++ b/gcc/testsuite/gcc.dg/pch/macro-3.c
@@ -1,6 +1,6 @@
#define DEFINED_FUNC_2(x) (3 + (x))
-#include "macro-3.hp"
+#include "macro-3.h"
int main(void)
{
diff --git a/gcc/testsuite/gcc.dg/pch/macro-3.h b/gcc/testsuite/gcc.dg/pch/macro-3.hs
index d394792..d394792 100644
--- a/gcc/testsuite/gcc.dg/pch/macro-3.h
+++ b/gcc/testsuite/gcc.dg/pch/macro-3.hs
diff --git a/gcc/testsuite/gcc.dg/pch/pch.exp b/gcc/testsuite/gcc.dg/pch/pch.exp
index 69422ca..746e8f9 100644
--- a/gcc/testsuite/gcc.dg/pch/pch.exp
+++ b/gcc/testsuite/gcc.dg/pch/pch.exp
@@ -36,11 +36,10 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
set nshort [file tail [file dirname $test]]/[file tail $test]
set bname "[file rootname [file tail $test]]"
- catch { file delete "$bname.hp.pch" }
catch { file delete "$bname.h.pch" }
+ catch { file delete "$bname.h" }
catch { file delete "$bname.s" }
catch { file delete "$bname.s-pch" }
- catch { file delete "$bname.hp" }
# We don't try to use the loop-optimizing options, since they are highly
# unlikely to make any difference to PCH.
@@ -49,30 +48,22 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
# For the header files, the default is to precompile.
set dg-do-what-default precompile
- dg-test -keep-output "[file rootname $test].h" $flags ""
+ file copy "[file rootname $test].hs" "$bname.h"
+ dg-test -keep-output "$bname.h" $flags ""
# For the rest, the default is to compile to .s.
set dg-do-what-default compile
if { [ file exists "$bname.h.pch" ] } {
- # To ensure that the PCH is used, not the original header,
- # the actual PCH file is renamed to "<foo>.hp.pch".
- file rename "$bname.h.pch" "$bname.hp.pch"
- if { [ is_remote host ] } {
- remote_download host "$bname.hp.pch"
- }
+ # Ensure that the PCH file is used, not the original header.
+ file delete "$bname.h"
dg-test -keep-output $test $flags "-I."
- file delete "$bname.hp.pch"
+ file delete "$bname.h.pch"
if { [ file exists "$bname.s" ] } {
file rename "$bname.s" "$bname.s-pch"
- if { [ is_remote host ] } {
- remote_upload host "[file rootname $test].h" "$bname.hp"
- } else {
- file copy "[file rootname $test].h" "$bname.hp"
- }
+ file copy "[file rootname $test].hs" "$bname.h"
dg-test -keep-output $test $flags "-I."
- remote_file host delete "$bname.hp"
set tmp [ diff "$bname.s" "$bname.s-pch" ]
if { $tmp == 0 } {
untested "$nshort $flags assembly comparison"
@@ -81,6 +72,7 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
} else {
fail "$nshort $flags assembly comparison"
}
+ file delete "$bname.h"
file delete "$bname.s"
file delete "$bname.s-pch"
} else {
diff --git a/gcc/testsuite/gcc.dg/pch/static-1.c b/gcc/testsuite/gcc.dg/pch/static-1.c
index c1816e9..33a1391 100644
--- a/gcc/testsuite/gcc.dg/pch/static-1.c
+++ b/gcc/testsuite/gcc.dg/pch/static-1.c
@@ -1,4 +1,4 @@
-#include "static-1.hp"
+#include "static-1.h"
static int bar(void)
{
static int counter;
diff --git a/gcc/testsuite/gcc.dg/pch/static-1.h b/gcc/testsuite/gcc.dg/pch/static-1.hs
index 08cc439..08cc439 100644
--- a/gcc/testsuite/gcc.dg/pch/static-1.h
+++ b/gcc/testsuite/gcc.dg/pch/static-1.hs
diff --git a/gcc/testsuite/gcc.dg/pch/static-2.c b/gcc/testsuite/gcc.dg/pch/static-2.c
index afda874..23e9af1 100644
--- a/gcc/testsuite/gcc.dg/pch/static-2.c
+++ b/gcc/testsuite/gcc.dg/pch/static-2.c
@@ -1,4 +1,4 @@
-#include "static-2.hp"
+#include "static-2.h"
int bar(void)
{
static int counter;
diff --git a/gcc/testsuite/gcc.dg/pch/static-2.h b/gcc/testsuite/gcc.dg/pch/static-2.hs
index 08cc439..08cc439 100644
--- a/gcc/testsuite/gcc.dg/pch/static-2.h
+++ b/gcc/testsuite/gcc.dg/pch/static-2.hs
diff --git a/gcc/testsuite/gcc.dg/pch/system-1.c b/gcc/testsuite/gcc.dg/pch/system-1.c
index 096fe59..9fde136 100644
--- a/gcc/testsuite/gcc.dg/pch/system-1.c
+++ b/gcc/testsuite/gcc.dg/pch/system-1.c
@@ -1,4 +1,4 @@
-#include "system-1.hp"
+#include "system-1.h"
int main(void)
{
puts ("hello world!");
diff --git a/gcc/testsuite/gcc.dg/pch/system-1.h b/gcc/testsuite/gcc.dg/pch/system-1.hs
index fbfff34..fbfff34 100644
--- a/gcc/testsuite/gcc.dg/pch/system-1.h
+++ b/gcc/testsuite/gcc.dg/pch/system-1.hs