From 5524676df831f5ffd3f42b74259b39824c9d4471 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Sun, 15 Nov 1998 19:24:43 +0000 Subject: decl.c (struct cp_function): Add named_label_uses. * decl.c (struct cp_function): Add named_label_uses. (push_cp_function_context): Save it. (pop_cp_function_context): Restore it. (define_label): Also complain about jumping into the scope of non-POD objects that don't have constructors. * tree.c (pod_type_p): New fn. Fixes g++.other/init9.C * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner. * rtti.c (synthesize_tinfo_fn): Call import_export_decl here. (get_tinfo_fn): Not here. * repo.c (repo_get_id): Abort if we get called for an incomplete type. Fixes g++.pt/instantiate4.C From-SVN: r23667 --- gcc/cp/repo.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/cp/repo.c') diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c index 742250d..b784020 100644 --- a/gcc/cp/repo.c +++ b/gcc/cp/repo.c @@ -99,6 +99,12 @@ repo_get_id (t) { if (TREE_CODE_CLASS (TREE_CODE (t)) == 't') { + /* If we're not done setting up the class, we may not have set up + the vtable, so going ahead would give the wrong answer. + See g++.pt/instantiate4.C. */ + if (TYPE_SIZE (t) == NULL_TREE || TYPE_BEING_DEFINED (t)) + my_friendly_abort (981113); + t = TYPE_BINFO_VTABLE (t); if (t == NULL_TREE) return t; -- cgit v1.1