+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.
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.
# 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"
} else {
fail "$nshort $flags assembly comparison"
}
+ file delete "$bname.h"
file delete "$bname.s"
file delete "$bname.s-pch"
} else {