]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gdc.dg/simd23085.d
Merge remote-tracking branch 'origin/master' into devel/c++-contracts
[thirdparty/gcc.git] / gcc / testsuite / gdc.dg / simd23085.d
CommitLineData
7e7ebe3e
IB
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
6float 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}