blob: 7316dc6529c988e5d8fb4ff8f6505730ce4175b4 [file] [log] [blame]
// { dg-do run { target c++11 } }
struct base
{
int calc_avg() { return 42; }
};
template <class T> struct nsdmi : T
{
nsdmi() {}
int avg() { return avg_; }
int avg_ = this->calc_avg();
};
int main()
{
nsdmi<base> x;
if (x.avg() != 42)
__builtin_abort();
}