summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pch
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-17 02:48:09 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-17 02:48:09 +0000
commit134ddbe60d6ea092644409339b2a0ffcf7f13a5f (patch)
tree2497b459ebd2d1cffb245377101a0b8fda8cd438 /gcc/testsuite/gcc.dg/pch
parentff279357b6c6e37678c1a02e5fbcbb81a70e1421 (diff)
downloadgcc-134ddbe60d6ea092644409339b2a0ffcf7f13a5f.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61419 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pch')
-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
39 files changed, 27 insertions, 35 deletions
diff --git a/gcc/testsuite/gcc.dg/pch/common-1.c b/gcc/testsuite/gcc.dg/pch/common-1.c
index dcf148a2a72..ec573102853 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 971e1996a24..971e1996a24 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 43256cad545..9a3d6700de3 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 6e25b021ab5..6e25b021ab5 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 b76c22cdb04..aab84110e01 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 6e25b021ab5..6e25b021ab5 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 e4120704d9b..5d6bb1d4aaf 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 399f5d3e7f4..399f5d3e7f4 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 c374a17e3f7..72b6538b932 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 99c37269097..99c37269097 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 9c95b9ad08e..c12abbb1cf4 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 787d480f208..787d480f208 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 3efe3829ffc..61affdbc0c8 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 3fb220032e0..3fb220032e0 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 f94b33a1363..705c2fe0df1 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 914983c4963..914983c4963 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 330876cc7c7..7daa7ca7fcd 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 e69de29bb2d..e69de29bb2d 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 0332609de2d..f81b098d7d8 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 33a893d1533..33a893d1533 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 4cab062345e..c1cff5f1c53 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 26efffcb2bb..26efffcb2bb 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 7fc32d7f766..38fad39c459 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 e8f1d6f138f..e8f1d6f138f 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 7792c828b92..59b238a3b7a 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 7d90c63deb9..7d90c63deb9 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 3775004a77b..70546bb092d 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 5d5b3f4ca65..5d5b3f4ca65 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 d058e2bb869..e2d965ff1e8 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 6152a84a877..6152a84a877 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 40ee46e4f3a..493d954980b 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 d394792a342..d394792a342 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 69422ca3ef0..746e8f96018 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 c1816e949b4..33a13912045 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 08cc4395d0e..08cc4395d0e 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 afda874e279..23e9af12679 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 08cc4395d0e..08cc4395d0e 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 096fe593e06..9fde1365d54 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 fbfff34edb0..fbfff34edb0 100644
--- a/gcc/testsuite/gcc.dg/pch/system-1.h
+++ b/gcc/testsuite/gcc.dg/pch/system-1.hs