* semantics.c (finish_non_static_data_member): Call maybe_dummy_object
[official-gcc/constexpr.git] / gcc / testsuite / g++.dg / template / crash72.C
blob5ab53656119ef17a520c6d804173ca6b030ad234
1 // PR c++/29225
2 // { dg-do compile }
4 template <typename L, typename R> bool operator< (L x, R y);
5 struct T { int t (); };
6 class S {};
8 struct U
10    typedef int (T::* M) ();
11    M m;
13    bool operator() (S &x)
14    {
15      T a;
16      return (a.*m) < x; // { dg-error "invalid use of non-static member" }
17    }
20 void foo (S &x)
22   U m;
23   m.m = &T::t;
24   m (x);