-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"floating-pointFloating-point mathFloating-point math
Description
This fails:
#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){
if(1){
float complex fc29;
int flags;
errno = 0;
feclearexcept(FE_ALL_EXCEPT);
fc29 = 0.f / CMPLXF(0.f,INFINITY); /* 0 / infinity */
flags = fetestexcept(FE_ALL_EXCEPT);
assert( 0 == errno );
assert( 0.f == crealf(fc29) );
assert( 0.f == cimagf(fc29) );
assert( !(FE_INVALID & flags) ); /* fails here */
}
return 0;
}
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"floating-pointFloating-point mathFloating-point math