half_float test fails with modern CPU features enabled
Submitted by Hans Johnson
Assigned to Nobody
Link to original bugzilla bug (#1780)
Version: 3.4 (development)
Operating system: Linux
Description
Created attachment 963
A script that demonstrates compiler flags that begin to fail for the half_float test
This unit test fails with compiler support of any of the following features
which are part of the "-march=ivybridge" architecture settings.
-target-feature +fsgsbase -target-feature +rdrnd -target-feature +f16c
VERIFY_IS_EQUAL( std::numeric_limits<half>::signaling_NaN().x, half(std::numeric_limits<float>::signaling_NaN()).x );
The failure is documented for both Mac/clang and Linux/gcc builds.
Using the "-mtune=native -march=native" compiler flags on recently (i.e. ~5 years ago) released CPU's demonstrates this issue.
Attachment 963, "A script that demonstrates compiler flags that begin to fail for the half_float test":
build_half_float.sh