c++: constantness of call to function pointer [PR111703]
[official-gcc.git] / gcc / testsuite / g++.dg / inherit / covariant16.C
blobe9cb769e2cf55a7ed9df03a2bc049f4309b5e9da
1 /* PR c++/28253 This used to ICE. */
2 /* { dg-do compile } */
4 struct A
6   virtual A* foo();
7 };
9 struct B : virtual A
11   virtual B* foo(); /* { dg-message "overridden" } */
14 struct C : B
16   virtual C& foo(); /* { dg-error "conflicting return type" } */