Bug 39507 - -ffinite-math-only causes wrong results on armel
Summary: -ffinite-math-only causes wrong results on armel
Status: RESOLVED DUPLICATE of bug 39501
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.3.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL: http://bugs.debian.org/520429
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-19 18:14 UTC by Kurt Roeckx
Modified: 2009-03-19 18:17 UTC (History)
5 users (show)

See Also:
Host: arm-linux-gnueabi
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
testcase showing the problem (234 bytes, text/plain)
2009-03-19 18:17 UTC, Kurt Roeckx
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kurt Roeckx 2009-03-19 18:14:32 UTC
Hi,

vorbis is creating wrong output on armel when using -ffast-math and -O1 or higher.  It's the option -ffinith-math-only that cause the problems.

I tried and can reproduce this problem with gcc versions 4.1.3, 4.2.4 and 4.3.3.

I've tried this test on various arches without problem, including i386, x86_64, hppa, ia64, mips, mipsel.  They did now show any problem.

I'll attach a test case shortly.

There is more information available at:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520429

Kurt
Comment 1 Kurt Roeckx 2009-03-19 18:17:42 UTC
Created attachment 17500 [details]
testcase showing the problem

/*
**	This file is in the Public Domain.
**
**	This program demonstrates a bug in the -ffast-math option of the gcc
**	armel compiler : gcc version 4.3.2 (Debian 4.3.2-1.1) 
**
**	This works as expected:
**
**	> gcc -Wall -O3 gcc-test.c -o gcc-test && ./gcc-test 
**	min :       0.0000    max :       0.0000
**
**	Compile with -ffast-math and things goes screwy.
**
**	> gcc -Wall -O3 -ffast-math gcc-test.c -o gcc-test && ./gcc-test 
**	min :   99999.0000    max :       0.0000
*/
Comment 2 Andrew Pinski 2009-03-19 18:17:56 UTC

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

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