summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/crash-7.C
blob: d5bc892c07cc8de6d2a36537949293b24449fe8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Origin: PR c++/42336
// { dg-options "-std=c++0x -O2 -g" }
// { dg-do compile }

struct X {
      void func() {}
};

template<typename T, void (X::*P)() = &T::func>
void b(T) {}

int main() {
      b(X()); /* line 9 */
        X().func();

          return 0;
}