diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-06-20 00:48:44 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-06-20 00:48:44 +0000 |
commit | 170b020fe4be4eadea27d389257778d952fb5a13 (patch) | |
tree | 18750127388f053e1dd83e7ae5f29fc9e9fe0bfb /gcc/testsuite/g++.dg | |
parent | 7a1d37e9102a1bbc34b4544161ddf283c667bc0b (diff) | |
download | gcc-170b020fe4be4eadea27d389257778d952fb5a13.tar.gz |
re PR middle-end/11041 (ICE: const myclass &x = *x; (when operator*() defined))
PR c++/11041
* call.c (initialize_reference): Do not use cp_finish_decl to emit
temporary variables.
* cp-tree.h (static_aggregates): Declare.
(pushdecl_top_level_and_finish): Likewise.
* decl.c (pushdecl_top_level_1): New function.
(pushdecl_top_level): Use it.
(pushdecl_top_level_and_finish): New function.
(initialize_local_var): Remove redundant code.
(cp_finish_decl): Remove support for RESULT_DECLs. Don't check
building_stmt_tree.
* decl.h (static_aggregates): Remove.
* decl2.c (get_guard): Use pushdecl_top_level_and_finish.
* rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
(tinfo_base_init): Likewise.
PR c++/11041
* g++.dg/init/ref7.C: New test.
From-SVN: r68236
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r-- | gcc/testsuite/g++.dg/init/ref7.C | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/init/ref7.C b/gcc/testsuite/g++.dg/init/ref7.C new file mode 100644 index 00000000000..0832069e32c --- /dev/null +++ b/gcc/testsuite/g++.dg/init/ref7.C @@ -0,0 +1,9 @@ +class hop +{ +public: + hop operator* () const; +}; +int main(void) +{ + const hop &x = *x; +} |