aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/parse12.C
blob: eb71775bcf0023494184b02bf46030ea9555ed57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PRMS Id: 6821

struct A {
  int operator()(int i) { return i; }
};

struct B {
  A* p;
  int f () { return (*p)(42); }	// gets bogus error
};

int main ()
{
  B b = { new A };

  return b.f () != 42;
}