[Bug target/45559] [4.4 regression] wrong conversion from unsigned int/long to float

2010-09-07 Thread lucas at lucas-nussbaum dot net


--- Comment #2 from lucas at lucas-nussbaum dot net  2010-09-07 07:32 
---
Yes, confirmed.

(sid)lu...@smetana:~$ gcc -o t t.c 
t.c: In function ‘main’:
t.c:7: warning: incompatible implicit declaration of built-in function ‘printf’
(sid)lu...@smetana:~$ ./t 
t=254733465 f=482062944
(sid)lu...@smetana:~$ gcc -mcpu=v8 -o t t.c 
t.c: In function ‘main’:
t.c:7: warning: incompatible implicit declaration of built-in function ‘printf’
(sid)lu...@smetana:~$ ./t
t=254733465 f=254733472
(sid)lu...@smetana:~$ cat t.c 
int
main()
{
  unsigned int t = 254733465;
  float f;
  f = (float) t;
  printf (t=%u f=%.0f\n, t, f);
}
(sid)lu...@smetana:~$ gcc -v
Using built-in specs.
Target: sparc-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.4-13'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.4 --enable-shared --enable-multiarch
--enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-targets=all --with-long-double-128 --enable-checking=release
--build=sparc-linux-gnu --host=sparc-linux-gnu --target=sparc-linux-gnu
Thread model: posix
gcc version 4.4.5 20100902 (prerelease) (Debian 4.4.4-13) 
(sid)lu...@smetana:~$ uname -a
Linux smetana 2.6.26-2-sparc64-smp #1 SMP Tue Aug 31 11:54:45 UTC 2010 sparc64
GNU/Linux


-- 


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



[Bug target/45559] [4.4 regression] wrong conversion from unsigned int/long to float

2010-09-07 Thread mikpe at it dot uu dot se


--- Comment #3 from mikpe at it dot uu dot se  2010-09-07 10:15 ---
Well then, the bug is not in gcc but in the Linux kernel's math emulation code. 
You need to update your kernel to one that includes the fix.  The fix is commit
f8324e20f8289dffc646d64366332e05eaacab25 in Linus' tree, and there is a link to
the original patch in PR44631.  It should also be in the official stable 2.6
kernels by now, but I wouldn't know how those relate to Debian's kernels.

Could the original bug reporter please close this PR as a dupe of PR44631.


-- 


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



[Bug target/45559] [4.4 regression] wrong conversion from unsigned int/long to float

2010-09-07 Thread zimmerma+gcc at loria dot fr


--- Comment #4 from zimmerma+gcc at loria dot fr  2010-09-07 11:47 ---
this is indeed a duplicate of #44631. It can be reproduced also with GCC 4.3
and
-mcpu=v9.

I suggest adding GMP-ECM make check in the regression tests for GCC (some
time
ago it was used for the efficiency tests). This would have hit this bug before
the release of 4.4.

Paul Zimmermann

*** This bug has been marked as a duplicate of 44631 ***


-- 

zimmerma+gcc at loria dot fr changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


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



[Bug target/45559] [4.4 regression] wrong conversion from unsigned int/long to float

2010-09-06 Thread mikpe at it dot uu dot se


--- Comment #1 from mikpe at it dot uu dot se  2010-09-06 17:15 ---
Dupe of PR44631?


-- 

mikpe at it dot uu dot se changed:

   What|Removed |Added

 CC||mikpe at it dot uu dot se


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



[Bug target/45559] [4.4 regression] wrong conversion from unsigned int/long to float

2010-09-06 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Severity|critical|normal


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