From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22715 invoked by alias); 20 Feb 2012 10:15:43 -0000 Received: (qmail 22701 invoked by uid 22791); 20 Feb 2012 10:15:41 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_CX,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mailout-de.gmx.net (HELO mailout-de.gmx.net) (213.165.64.22) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Mon, 20 Feb 2012 10:15:09 +0000 Received: (qmail 26706 invoked by uid 0); 20 Feb 2012 10:15:07 -0000 Received: from 93.215.17.254 by www014.gmx.net with HTTP; Mon, 20 Feb 2012 11:15:04 +0100 (CET) Content-Type: text/plain; charset="utf-8" Date: Mon, 20 Feb 2012 10:15:00 -0000 From: "Yatko" Message-ID: <20120220101504.193540@gmx.net> MIME-Version: 1.0 Subject: Mipsel - big float problem with g++, not gcc (crosstool-ng.1.3.4) To: crossgcc@sourceware.org Content-Transfer-Encoding: 8bit Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00079.txt.bz2 Hello list, we are trying to compile a program which is written in c++. All the outputs for float values are NAN. After some research we was able to produce this on a simple testprogram see below (fl2.c): g++ configured as shown below: $ mipsel-unknown-linux-gnu-g++ -v Using built-in specs. Target: mipsel-unknown-linux-gnu Configured with: /crosstool-ng-1.13.4/.build/src/gcc-4.3.2/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=mipsel-unknown-linux-gnu --prefix=/x-tools/mipsel-unknown-linux-gnu --with-sysroot=/x-tools/mipsel-unknown-linux-gnu/mipsel-unknown-linux-gnu/sysroot --enable-languages=c,c++ --disable-multilib --with-arch=mips1 --with-abi=32 --with-float=soft --with-pkgversion='crosstool-NG 1.13.4' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --with-gmp=/crosstool-ng-1.13.4/.build/mipsel-unknown-linux-gnu/build/static --with-mpfr=/crosstool-ng-1.13.4/.build/mipsel-unknown-linux-gnu/build/static --enable-threads=posix --enable-target-optspace --with-local-prefix=/x-tools/mipsel-unknown-linux-gnu/mipsel-unknown-linux-gnu/sysroot --disable-nls --enable-c99 --enable-long-long Thread model: posix gcc version 4.3.2 (crosstool-NG 1.13.4) program in action: [ mipsel-mips32-linux-gnu-g++ fl2.c -o fl2 ] $./fl2 min float value == nan max float value == nan [ mipsel-mips32-linux-gnu-g++ fl2.c -o fl2 -static ] $./fl2 FATAL: kernel too old Segmentation fault [ mipsel-mips32-linux-gnu-g++ fl2.c -o fl2 ] (changing in the program float to double works, but we need to use floats) $./fl2 min float value == 0.000000 max float value == 340282346638528859811704183484516925440.000000 --- testprogram reproduce this problem: compile with g++, not gcc: mipsel-mips32-linux-gnu-g++ fl2.c -o fl2 fl2.c: #include #include int main() { float minval = FLT_MIN; // with float NAN float maxval = FLT_MAX; // with float NAN printf("min float value == %f\n" "max float value == %f\n", (double)minval, maxval); return 0; } all kind of support is much appreciated. Thanks ! Yatko -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de -- For unsubscribe information see http://sourceware.org/lists.html#faq