gcc/testsuite/g++.old-deja/g++.other/decl3.C
raw| 1 | // { dg-do assemble } |
| 2 | |
| 3 | // Origin: Adapted by Nathan Sidwell 29 Apr 1999 <[email protected]> |
| 4 | // from a test case submitted by Corey Kosak <[email protected]> |
| 5 | // http://gcc.gnu.org/ml/gcc-bugs/1999-04n/msg00505.html |
| 6 | |
| 7 | // We should not allow arrays of abstract type. [class.abstract/2] |
| 8 | |
| 9 | struct cow_t { // { dg-message "pure" } |
| 10 | virtual void f()=0; // { dg-message "note" } |
| 11 | }; |
| 12 | |
| 13 | |
| 14 | int main() |
| 15 | { |
| 16 | cow_t cow[2]; // { dg-error "abstract" } |
| 17 | cow[0].f(); |
| 18 | return 0; |
| 19 | } |