This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

float->double->float conversion with 19991122 snapshot (Linux/Intel)


The following simple program produces output like "0.500000 3.736713";
I expect to see "0.500000 0.500000".  I am trying the 19991122 snapshot
on Linux/Intel with glibc-2.1.2.  (I am lazily hoping that this will be
easily reproducible and I will not have to provide preprocessor output.)
 
/* begin C code */
 
# include <stdio.h>
 
float f (float);
 
int
main (void)
{
   float x = 0.5;
   printf ("%f %f\n", x, f(x));
   return 0;
}
 
float
f (float xx)
{
   double x = xx;
   return x;
}
 
/* end C code */
 
--
Paul Kimoto             <kimoto@lightlink.com>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]