https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69086
Bug ID: 69086
Summary: crealf may be invalid value
Product: gcc
Version: 4.8.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: ka_bena at yahoo dot fr
Target Milestone: ---
# include <stdlib.h>
# include <stdio.h>
# include <complex.h>
int main( void)
{
float A1 = 1.f/0.f ;
float A2 = 1.f/0.f ;
_Complex float A3 = A1 + A2*1.Fi ;
printf("%f\n",A1);
printf("%f\n",crealf(A3));
printf("%f\n",A2);
printf("%f\n",cimagf(A3));
return 0 ;
}
/*
RESULTS::
inf
-nan
inf
inf
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)
gcc -std=gnu99 -Wall -Wextra -omain_crealf.exe main_crealf.c ;
*/