[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] ARM (RPi) compiler bug
From: |
Christian Jullien |
Subject: |
[Tinycc-devel] ARM (RPi) compiler bug |
Date: |
Sat, 2 Feb 2013 12:26:04 +0100 |
Hi all,
Trying to port my (extremely portable Bignum lib:
http://sourceforge.net/projects/bigz/)
This code snippet, isolates the error I get:
#include <stdio.h>
void
main(void)
{
double dbl = 44.361420;
size_t len = 2;
printf("1) =>%f %ld\n", dbl, len);
printf("2) =>%f\n", dbl * 64);
printf("3) =>%f\n", dbl * 32 * len); // BUG here!!!
}
$ tcc -o foo foo.c && ./foo
1) =>44.361420 2
2) =>2839.130880
3) =>64384184694.211205
My conf:
git clone -b mob git://repo.or.cz/tinycc.git
cd tinycc
git pull
./configure --with-libgcc
make
make test // no error
$ uname -a
Linux sims 3.6.11+ #366 PREEMPT Wed Jan 30 12:59:10 GMT 2013 armv6l
GNU/Linux
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.7/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5+rpi1'
--with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-gnu-unique-object --disable-libitm --enable-plugin --enable-objc-gc
--disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard
--enable-checking=release --build=arm-linux-gnueabihf
--host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5+rpi1)
- [Tinycc-devel] ARM (RPi) compiler bug,
Christian Jullien <=