Debian Codegraph @

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

raw
1 // https://issues.dlang.org/show_bug.cgi?id=23077
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 test23077(float x)
7 {
8 short i = *cast(short*)&x;
9 ++i;
10 return *cast(float*)&i; // this cast is not allowed in @safe code
11 }