gcc/testsuite/gdc.dg/rtti1.d
raw| 1 | // { dg-do compile } |
| 2 | // { dg-options "-fno-rtti" } |
| 3 | // { dg-shouldfail "expressions depend on TypeInfo" } |
| 4 | |
| 5 | int* testInExp(int key, int[int] aa) |
| 6 | { |
| 7 | return key in aa; // { dg-error "requires .object.TypeInfo. and cannot be used with .-fno-rtti." } |
| 8 | } |
| 9 | |
| 10 | bool testAAEqual(int[string] aa1, int[string] aa2) |
| 11 | { |
| 12 | return aa1 == aa2; // { dg-error "requires .object.TypeInfo. and cannot be used with .-fno-rtti." } |
| 13 | } |