diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.robertl/eb60.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.robertl/eb60.C | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb60.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb60.C new file mode 100644 index 000000000..ea80a4ce2 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb60.C @@ -0,0 +1,18 @@ +// { dg-do assemble } +#include <string> + +class t { +public: + t(const std::string& s) : s_(s) {} + std::string s_; + static t* t_; +}; + +t* t::t_; + +t* makeT() +{ + return new t("test"); + return t::t_ ? t::t_ : + t::t_ = new t("test"); +} |