diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-11-15 19:24:43 +0000 |
---|---|---|
committer | Jason Merrill <jason@yorick.cygnus.com> | 1998-11-15 19:24:43 +0000 |
commit | 2c39000be08faab890a6db7e21269bac2812901f (patch) | |
tree | d52e9ad4f9e03949fb8a6ac2190c3669dde51a01 /gcc/cp/repo.c | |
parent | 3c54f85ae897d276b0eb9a9e86e7a8e558737439 (diff) |
* 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
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@23667 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/repo.c')
-rw-r--r-- | gcc/cp/repo.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c index 742250dc632..b78402086c8 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; |