gcc/testsuite/gdc.test/compilable/test23166.d
raw| 1 | // REQUIRED_ARGS: -inline |
| 2 | |
| 3 | // https://issues.dlang.org/show_bug.cgi?id=23166 |
| 4 | |
| 5 | // seg fault with -inline |
| 6 | |
| 7 | bool __equals(scope const char[] lhs, scope const char[] rhs) |
| 8 | { |
| 9 | if (lhs.length != rhs.length) |
| 10 | return false; |
| 11 | |
| 12 | { |
| 13 | import core.stdc.string : memcmp; |
| 14 | return lhs.length == 0; |
| 15 | } |
| 16 | return true; |
| 17 | } |
| 18 | |
| 19 | int test(string type) |
| 20 | { |
| 21 | return __equals(type, "as-is"); |
| 22 | } |