gcc/testsuite/gdc.dg/pr119139.d
raw| 1 | // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119139 |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-fdump-tree-gimple" } |
| 4 | string toString() |
| 5 | { |
| 6 | return "1"; |
| 7 | } |
| 8 | |
| 9 | struct B |
| 10 | { |
| 11 | ulong n; |
| 12 | |
| 13 | invariant{} |
| 14 | |
| 15 | string str() |
| 16 | { |
| 17 | if (n == 0) |
| 18 | { |
| 19 | return "0"; |
| 20 | } |
| 21 | return toString(); |
| 22 | } |
| 23 | } |
| 24 | // { dg-final { scan-tree-dump-not "static const struct __result =" "gimple" } } |