gcc/testsuite/g++.dg/modules/tplmem-1_b.C
raw| 1 | // { dg-additional-options "-fmodules-ts" } |
| 2 | |
| 3 | import frob; |
| 4 | |
| 5 | int main () |
| 6 | { |
| 7 | A a; |
| 8 | |
| 9 | if (int (a) != 99) |
| 10 | return 1; |
| 11 | if (float (a) != 99) |
| 12 | return 2; |
| 13 | if (static_cast <void *> (a) != (void *)99) |
| 14 | return 3; |
| 15 | |
| 16 | B<int> bi(1); |
| 17 | B<float> bf(1.25f); |
| 18 | if (int (bi) != 1) |
| 19 | return 4; |
| 20 | if (int (bf) != 1) |
| 21 | return 5; |
| 22 | |
| 23 | // 1.25 is exactly representable |
| 24 | if (float (bf) != 1.25f) |
| 25 | return 6; |
| 26 | |
| 27 | return 0; |
| 28 | } |