Debian Codegraph @

gcc/testsuite/gdc.dg/torture/simd23085.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=23085
2 // { dg-additional-options "-mavx" { target avx_runtime } }
3 // { dg-do compile }
4 // { dg-skip-if "needs gcc/config.d" { ! d_runtime } }
5
6 float test23085(float x)
7 {
8 byte i = *cast(byte*)&x;
9 ++i;
10 return *cast(float*)&i; // this cast is not allowed in @safe code
11 }