summaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-16 14:29:27 +0000
committerlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-16 14:29:27 +0000
commit68efb5b86d2fac3bc223c1e5fc4fc26091df2109 (patch)
tree474d17dc602be1e20e793f14d2d2702f7ad55198 /gcc/cp/decl2.c
parent91c237c4f3491c15083135bf8e2e2a31fa800e42 (diff)
downloadgcc-68efb5b86d2fac3bc223c1e5fc4fc26091df2109.tar.gz
PR c++/6749
* pt.c (instantiate_pending_templates): Add int parameter. Don't return anything. * cp-tree.h (instantiate_pending_templates): Adjust prototype. * decl2.c (finish_file): Adjust call to instantiate_pending_templates. * g++.dg/template/vtable2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86054 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index ab83b982210..efb86b5534a 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -2721,6 +2721,7 @@ finish_file (void)
size_t i;
location_t locus;
unsigned ssdf_count = 0;
+ int retries = 0;
locus = input_location;
at_eof = 1;
@@ -2772,7 +2773,7 @@ finish_file (void)
/* If there are templates that we've put off instantiating, do
them now. */
- instantiate_pending_templates ();
+ instantiate_pending_templates (retries);
ggc_collect ();
/* Write out virtual tables as required. Note that writing out
@@ -2780,7 +2781,7 @@ finish_file (void)
instantiation of members of that class. If we write out
vtables then we remove the class from our list so we don't
have to look at it again. */
-
+
while (keyed_classes != NULL_TREE
&& maybe_emit_vtables (TREE_VALUE (keyed_classes)))
{
@@ -2806,14 +2807,14 @@ finish_file (void)
next = TREE_CHAIN (t);
}
}
-
+
/* Write out needed type info variables. We have to be careful
looping through unemitted decls, because emit_tinfo_decl may
cause other variables to be needed. We stick new elements
(and old elements that we may need to reconsider) at the end
of the array, then shift them back to the beginning once we're
done. */
-
+
n_old = VARRAY_ACTIVE_SIZE (unemitted_tinfo_decls);
for (i = 0; i < n_old; ++i)
{
@@ -2994,6 +2995,8 @@ finish_file (void)
reconsider = true;
if (cgraph_varpool_assemble_pending_decls ())
reconsider = true;
+
+ retries++;
}
while (reconsider);