[forwarded from http://bugs.debian.org/581571]

seen with current 4.3, 4.4, 4.5, trunk

gcc -O0 -mcpu=v9 foo.c && ./a.out prints 2.47804e+17 instead of 9.79798e+16.
works with -mcpu=v8.
same error with gcc -m64 -O0 foo.c && ./a.out

#include <stdio.h>
int main(void) {
    unsigned long long l = 97979797979797980LL;

    printf("%g\n", (double)l);
    return(0);
}


-- 
           Summary: [sparc] long long to double conversion error
           Product: gcc
           Version: 4.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: doko at ubuntu dot com
GCC target triplet: sparc-linux-gnu sparc64-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44631

Reply via email to