gcc/testsuite/g++.dg/modules/nested-2_b.C
raw| 1 | // { dg-module-do run } |
| 2 | // { dg-additional-options "-fmodules-ts" } |
| 3 | |
| 4 | import bob; |
| 5 | |
| 6 | int main () |
| 7 | { |
| 8 | X ary[10]; |
| 9 | X::iter iter; |
| 10 | unsigned ix; |
| 11 | |
| 12 | for (ix = 10, iter = ary; ix--; iter++) |
| 13 | iter->set (ix); |
| 14 | |
| 15 | for (ix = 10; ix--;) |
| 16 | if (ary[ix] + ix != 9) |
| 17 | return 1; |
| 18 | |
| 19 | return 0; |
| 20 | } |