This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PCH] save some more counters


Track down and mark a bunch more counters of various kinds.

Tested by running the pch testsuite on powerpc-darwin.

-- 
- Geoffrey Keating <geoffk@apple.com>

===File ~/patches/pchbranch-funccounter.patch===============
Index: ChangeLog
2002-11-19  Geoffrey Keating  <geoffk@apple.com>

	* function.c (funcdef_no): Mark to be saved in a PCH.

Index: cp/ChangeLog
2002-11-19  Geoffrey Keating  <geoffk@apple.com>

	* decl.c (anon_cnt): Mark to be saved for PCH.

Index: testsuite/ChangeLog
2002-11-19  Geoffrey Keating  <geoffk@apple.com>

	* gcc.dg/pch/except-1.h: New.
	* gcc.dg/pch/except-1.c: New.

Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.341.4.23
diff -u -p -u -p -r1.341.4.23 function.c
--- function.c	10 Nov 2002 07:16:55 -0000	1.341.4.23
+++ function.c	20 Nov 2002 00:43:03 -0000
@@ -123,7 +123,7 @@ int current_function_uses_only_leaf_regs
 int virtuals_instantiated;
 
 /* Assign unique numbers to labels generated for profiling, debugging, etc.  */
-static int funcdef_no;
+static GTY(()) int funcdef_no;
 
 /* These variables hold pointers to functions to create and destroy
    target specific, per-function data structures.  */
Index: cp/decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.847.2.21
diff -u -p -u -p -r1.847.2.21 decl.c
--- cp/decl.c	10 Nov 2002 07:18:45 -0000	1.847.2.21
+++ cp/decl.c	20 Nov 2002 00:43:10 -0000
@@ -2813,7 +2813,7 @@ pushtag (name, type, globalize)
 
 /* Counter used to create anonymous type names.  */
 
-static int anon_cnt = 0;
+static GTY(()) int anon_cnt;
 
 /* Return an IDENTIFIER which can be used as a name for
    anonymous structs and unions.  */
Index: testsuite/gcc.dg/pch/except-1.c
===================================================================
RCS file: testsuite/gcc.dg/pch/except-1.c
diff -N testsuite/gcc.dg/pch/except-1.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/pch/except-1.c	20 Nov 2002 00:43:15 -0000
@@ -0,0 +1,7 @@
+/* { dg-options "-fexceptions -I." } */
+#include "except-1.hp"
+
+int main(void) 
+{
+  return foo(1);
+}
Index: testsuite/gcc.dg/pch/except-1.h
===================================================================
RCS file: testsuite/gcc.dg/pch/except-1.h
diff -N testsuite/gcc.dg/pch/except-1.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/pch/except-1.h	20 Nov 2002 00:43:15 -0000
@@ -0,0 +1,6 @@
+/* { dg-options "-fexceptions" } */
+extern inline int
+foo(int a)
+{
+  return a + 1;
+}
============================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]