diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-29 19:03:31 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-29 19:03:31 +0000 |
commit | ba3a3d1f24b70786bf60198b0d8186b55305c099 (patch) | |
tree | 99bba146483ca359f5f8c34914144ca70c2b4ae4 /gcc/testsuite | |
parent | 18d113ce3dab0cc67ae9c42e916028a30afcacea (diff) | |
download | gcc-ba3a3d1f24b70786bf60198b0d8186b55305c099.tar.gz |
* cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
(maybe_inject_for_scope_var): Declare it.
(initialize_local_var): Likewise.
* decl.c (maybe_inject_for_scope_var): Make it global.
(initialize_local_var): Likewise. Move cleanup handling here,
from cp_finish_decl.
(make_rtl_for_nonlocal_decl): Use
push_obstacks_nochange/pop_obstacks, rather than
end_temporary_allocation/resume_temporary_allocation.
(cp_finish_decl): Try to complete the type of a variable when it
is declared. Move cleanup-handling to initialize_local_var.
(expand_static_init): Use tree-building code, rather than
RTL-building code.
* decl2.c (get_temp_name): Assert non-initializedness of
temporaries.
* init.c (create_temporary_var): Move RTL-assigning code to ...
(get_temp_regvar): Here.
* pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
* semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
call initialize_local_var to generate initialization code.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28973 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/crash52.C | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash52.C b/gcc/testsuite/g++.old-deja/g++.pt/crash52.C new file mode 100644 index 00000000000..4d2de6198a3 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/crash52.C @@ -0,0 +1,25 @@ +// Build don't link: +// Origin: Mark Mitchell <mark@codesourcery.com> + +template <class T> +struct S1 +{ + template <class U> + struct S2 + { + S2(U); + }; + + template <class U> + void f(U u) + { + S2<U> s2u(u); + } +}; + +void g() +{ + S1<int> s1; + s1.f(3.0); +} + |