summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gcc.dg/pch
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-05 07:01:51 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-05 07:01:51 +0000
commitcf8e41a4a8b4cfb39ccd51990fea5b578d3809f3 (patch)
tree3da09cdc35a115a5b68c8b9d716e7e83e9721d11 /gcc/testsuite/gcc.dg/pch
parente663564a8727bd547867882dbd1233f0b5f4d1f9 (diff)
downloadppe42-gcc-cf8e41a4a8b4cfb39ccd51990fea5b578d3809f3.tar.gz
ppe42-gcc-cf8e41a4a8b4cfb39ccd51990fea5b578d3809f3.zip
2003-04-04 Geoffrey Keating <geoffk@apple.com>
* dbxout.c (scope_labelno): Add GTY. (have_used_extensions): Add GTY. (source_label_number): Add GTY. (lastfile): Add GTY. (lastfile_is_base): New. (base_input_file): New. (dbxout_handle_pch): New. (dbx_debug_hooks): Add handle_pch. (xcoff_debug_hooks): Likewise. (dbxout_function_end): Remove scope_labelno. (dbxout_init): Set base_input_file. (dbxout_handle_pch): New. (dbxout_source_file): Honour lastfile_is_base. * dwarfout.c (dwarf_debug_hooks): Add dummy handle_pch. * sdbout.c (sdb_debug_hooks): Add dummy handle_pch. * vmsdbgout.c (vmsdbg_debug_hooks): Add dummy handle_pch. * dwarf2out.c (dwarf2_debug_hooks): Add dummy handle_pch. * debug.c (do_nothing_debug_hooks): Add dummy handle_pch. * debug.h (struct gcc_debug_hooks): Add handle_pch. * c-pch.c (pch_init): Don't call start_source_file, but do call handle_pch. (c_common_write_pch): Call handle_pch. (c_common_read_pch): Don't call start_source_file, or end_source_file. Index: gcc/testsuite/ChangeLog 2003-04-04 Geoffrey Keating <geoffk@apple.com> * gcc.dg/pch/static-3.c: New. * gcc.dg/pch/static-3.hs: New. * gcc.dg/pch/pch.exp: Test with -O0 -g too. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65266 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pch')
-rw-r--r--gcc/testsuite/gcc.dg/pch/pch.exp7
-rw-r--r--gcc/testsuite/gcc.dg/pch/static-3.c8
-rw-r--r--gcc/testsuite/gcc.dg/pch/static-3.hs7
3 files changed, 20 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/pch/pch.exp b/gcc/testsuite/gcc.dg/pch/pch.exp
index 7a5aacaac56..543d6147d7b 100644
--- a/gcc/testsuite/gcc.dg/pch/pch.exp
+++ b/gcc/testsuite/gcc.dg/pch/pch.exp
@@ -41,8 +41,11 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
catch { file delete "$bname.s-gch" }
# We don't try to use the loop-optimizing options, since they are highly
- # unlikely to make any difference to PCH.
- foreach flags $torture_without_loops {
+ # unlikely to make any difference to PCH. However, we do want to
+ # add -O0 -g, since users who want PCH usually want debugging and quick
+ # compiles.
+ set pch_torture [concat [list {-O0 -g}] $torture_without_loops]
+ foreach flags $pch_torture {
verbose "Testing $nshort, $flags" 1
# For the header files, the default is to precompile.
diff --git a/gcc/testsuite/gcc.dg/pch/static-3.c b/gcc/testsuite/gcc.dg/pch/static-3.c
new file mode 100644
index 00000000000..eae0ab07805
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pch/static-3.c
@@ -0,0 +1,8 @@
+#include "static-3.h"
+int bar(int *a)
+{
+ int i, tot;
+ for (i = tot = 0; i < 100; i++)
+ tot += a[i];
+ return tot;
+}
diff --git a/gcc/testsuite/gcc.dg/pch/static-3.hs b/gcc/testsuite/gcc.dg/pch/static-3.hs
new file mode 100644
index 00000000000..b881945f5ea
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pch/static-3.hs
@@ -0,0 +1,7 @@
+static int foo(int *a)
+{
+ int i, tot;
+ for (i = tot = 0; i < 100; i++)
+ tot += a[i];
+ return tot;
+}
OpenPOWER on IntegriCloud