1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 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"); }