summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.robertl/eb69.C
blob: 1ada91234294fbf615f205c219b98e16e9362665 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// { dg-do assemble  }
// Test that g++ complains about referring to a builtin type in a
// mem-initializer.
// Contributed by Kevin Buhr <buhr@stat.wisc.edu>

int r = 0;

struct foo {		        // { dg-message "note" } candidate
  foo(int x) { r = 1; }		// { dg-message "note" }
};

struct bar : foo {
  typedef int an_int;
  bar() : bar::an_int(3) {}	// { dg-error "match" "match" } not a base
  // { dg-message "candidate" "candidate note" { target *-*-* } 14 }
  // { dg-message "expected" "exp" { target *-*-* } 14 }
};

int
main() {
  bar b;
  return r;
}