gcc/testsuite/gdc.dg/pr96301b.d
raw| 1 | // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96301 |
| 2 | // { dg-additional-options "-fPIC" { target fpic } } |
| 3 | // { dg-do compile } |
| 4 | class Container |
| 5 | { |
| 6 | int[100] children; |
| 7 | |
| 8 | void remove(void* data) |
| 9 | { |
| 10 | int[100] remove(int[100] range) |
| 11 | { |
| 12 | auto result = range; |
| 13 | if (result.front) |
| 14 | return result; |
| 15 | assert(0); |
| 16 | } |
| 17 | if (data) |
| 18 | remove(children); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | int front(int[100] a) |
| 23 | { |
| 24 | return a.ptr[0]; |
| 25 | } |