aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/opt/ptrmem4.C
blob: ad39a371b58bd786737c13253dbb8b0a2e4c6435 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// { dg-do compile }
// { dg-options "-O3" }

struct X { void foo (); }; 
 
template <typename> 
inline void spawn (void (X::*fun_ptr)()) {} 
 
void bar () { 
  void (X::*const comp)() = &X::foo; 
  spawn<int> (comp); 
}