8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/constexpr-neg3.C
Jason Merrill 22c6ea0042 re PR c++/58612 ([c++11] ICE calling non-constexpr from constexpr in template class)
PR c++/58612
	* tree.c (bot_replace): Only replace a dummy 'this' parm.

From-SVN: r212505
2014-07-14 01:25:25 -04:00

16 lines
264 B
C

// PR c++/58612
// { dg-do compile { target c++11 } }
struct A
{
int foo() const { return 0; }
};
template<typename> struct B
{
A a;
constexpr int bar() { return a.foo(); } // { dg-error "foo" }
};
constexpr int i = B<void>().bar(); // { dg-error "bar" }