diff options
author | Mark Mitchell <mark@codesourcery.com> | 1999-09-24 01:17:29 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1999-09-24 01:17:29 +0000 |
commit | 0fa5e05c2f36dda5b06b259779afc7867b0da9f7 (patch) | |
tree | b2c6898fd3ead0e1c37050fb2615df46e6890c1d /gcc/testsuite | |
parent | a571f7a00e33edb193e1a74869dab3f0576eb87c (diff) | |
download | gcc-0fa5e05c2f36dda5b06b259779afc7867b0da9f7.zip gcc-0fa5e05c2f36dda5b06b259779afc7867b0da9f7.tar.gz gcc-0fa5e05c2f36dda5b06b259779afc7867b0da9f7.tar.bz2 |
cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
* cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
* decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
Don't call expand_anon_union_decl here
* semantics.c (exapnd_stmt): Call it here, instead.
* typeck.c (mark_addressable): Addressed variables are implicitly
used.
From-SVN: r29645
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.eh/crash2.C | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/crash2.C b/gcc/testsuite/g++.old-deja/g++.eh/crash2.C new file mode 100644 index 0000000..463df9d --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.eh/crash2.C @@ -0,0 +1,27 @@ +// Build don't link: +// Origin: Thomas Kunert <kunert@physik.tu-dresden.de> +// Special g++ Options: -O + +struct C { + ~C(); +}; + +struct R { + bool empty() const; + C m_; +}; + +struct R1 { + R1( const R& a ); + ~R1 (); + C m_; +}; + +R1 get_empty(); + +R1::R1( const R& a ) : + m_( a.empty() ? get_empty().m_ : C() ) +{} + +void qnorm( const R & r) +{ R1 n( r ); } |