Package: gcc-4.4
Version: 4.4.4-11
Severity: normal

Hello,

The present bugreport is a followup to #593193 and a regression wrt
4.3.

Steps to reproduce:

    (sid)smetana:~/gcc-4.4/gmp-ecm-6.3$ cat bug.c
    #include <stdio.h>

    int
    main()
    {
      unsigned int t = 254733465;
      float f;
      f = (float) t;
      printf ("t=%u f=%.0f\n", t, f);
    }

    (sid)smetana:~/gcc-4.4/gmp-ecm-6.3$ gcc-4.4 bug.c; ./a.out
    t=254733465 f=482062944

    (sid)smetana:~/gcc-4.4/gmp-ecm-6.3$ gcc-4.3 bug.c; ./a.out
    t=254733465 f=254733472

The correct result is the second one, since the closest single precision
float (24-bit significand) from 254733465 is 254733472.

Many thanks to Lucas Nussbaum and Paul Zimmermann for working on this
bug.

Regards,

Laurent Fousse.



-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100906163435.ga3...@menthe.lateralis.org

Reply via email to