Under certain circumstances, the ix86expandbuiltin function in i386.c in GNU Compiler Collection (GCC) version 4.6, 4.7, 4.8, 4.9, 5 before 5.5, and 6 before 6.4 will generate instruction sequences that clobber the status flag of the RDRAND and RDSEED intrinsics before it can be read, potentially causing failures of these instructions to go unreported.
Upstream bug:
https://gcc.gnu.org/bugzilla/showbug.cgi?id=80180
Upstream patch:
https://gcc.gnu.org/ml/gcc-patches/2017-03/msg01349.html
References:
http://seclists.org/oss-sec/2017/q3/218