Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/ipa/pr86529.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
line wrap: on
line source
// { dg-do compile } // { dg-options "-fipa-pure-const -std=c++11" } namespace std { class type_info { public: bool operator==(type_info); }; class c { public: c(int) {} type_info b; virtual void *d() { if (b == typeid(int)) return e(); return nullptr; } int *e() noexcept; }; class h { public: template <typename g, typename f> h(g, f j) { new c(j); } }; class k { protected: int n; k() : i(0, n) {} h i; }; class F : k { public: F(int, int) {} template <typename, typename f, typename...> friend F l(const f &); }; template <typename, typename f, typename...> F l(const f &p1) { F x(int(), p1); return x; } template <typename> F m() { l<int>(int()); return F(0, 0); } class D { F p; public: D() : p(m<int>()) {} }; } // namespace std std::D a;