- Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.floating-pointFloating-point mathFloating-point math
Description
#include <assert.h> #include <limits.h> #include <errno.h> #include <stdio.h> #include <float.h> #include <fenv.h> #include <complex.h> #include <math.h>/* glibc 2.41-11 */ #pragma STDC FENV_ACCESS ON #pragma STDC FP_CONTRACT OFF #pragma STDC FENV_ROUND FE_TONEAREST #pragma STDC FENV_DEC_ROUND FE_DEC_TONEAREST #pragma STDC CX_LIMITED_RANGE OFF int main(void){ feclearexcept(FE_ALL_EXCEPT); errno = 0; if(1){ union { float f32; int i; } uf0 = { 0.F / 0.F }; int flags; flags = fetestexcept(FE_ALL_EXCEPT); assert( 0 == errno ); assert( isnan( uf0.f32 ) ); assert( 0 != flags );/* fails here */ assert( FE_INVALID == flags ); } return 0; }Metadata
Metadata
Assignees
Labels
clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.floating-pointFloating-point mathFloating-point math