Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.old-deja / g++.robertl / eb69.C
blob1ada91234294fbf615f205c219b98e16e9362665
1 // { dg-do assemble  }
2 // Test that g++ complains about referring to a builtin type in a
3 // mem-initializer.
4 // Contributed by Kevin Buhr <buhr@stat.wisc.edu>
6 int r = 0;
8 struct foo {                    // { dg-message "note" } candidate
9   foo(int x) { r = 1; }         // { dg-message "note" }
12 struct bar : foo {
13   typedef int an_int;
14   bar() : bar::an_int(3) {}     // { dg-error "match" "match" } not a base
15   // { dg-message "candidate" "candidate note" { target *-*-* } 14 }
16   // { dg-message "expected" "exp" { target *-*-* } 14 }
19 int
20 main() {
21   bar b;
22   return r;