gcc/testsuite/gdc.test/fail_compilation/test16381.d
raw| 1 | /* |
| 2 | REQUIRED_ARGS: -m64 |
| 3 | TEST_OUTPUT: |
| 4 | --- |
| 5 | fail_compilation/test16381.d(15): Error: cannot take address of expression `foo()` because it is not an lvalue |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | // https://issues.dlang.org/show_bug.cgi?id=16381 |
| 10 | |
| 11 | __vector(float[4]) foo(); |
| 12 | |
| 13 | void bar() |
| 14 | { |
| 15 | float g = foo().ptr[0]; |
| 16 | } |