| 1 |
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96157 |
| 2 |
// { dg-options "-fno-moduleinfo -fno-rtti" } |
| 3 |
// { dg-do compile } |
| 4 |
|
| 5 |
int[] testYearsBC; |
| 6 |
|
| 7 |
struct FilterResult |
| 8 |
{ |
| 9 |
int[] input; |
| 10 |
bool primed; |
| 11 |
|
| 12 |
this(int[] r) |
| 13 |
{ |
| 14 |
this.input = r; |
| 15 |
} |
| 16 |
|
| 17 |
int front() |
| 18 |
{ |
| 19 |
return input[0]; |
| 20 |
} |
| 21 |
}; |
| 22 |
|
| 23 |
FilterResult filter(int[] range) |
| 24 |
{ |
| 25 |
return FilterResult(range); |
| 26 |
} |
| 27 |
|
| 28 |
int[] chain(int[] rs) |
| 29 |
{ |
| 30 |
return rs; |
| 31 |
} |
| 32 |
|
| 33 |
struct SysTime |
| 34 |
{ |
| 35 |
this(int); |
| 36 |
} |
| 37 |
|
| 38 |
void test() |
| 39 |
{ |
| 40 |
while (1) |
| 41 |
{ |
| 42 |
FilterResult val = filter(chain(testYearsBC)); |
| 43 |
int year = val.front(); |
| 44 |
SysTime(0); |
| 45 |
} |
| 46 |
} |