This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/21809] New: [3.4/4.0/4.1 Regression] Floating Optimization Bug
- From: "themis_hv at yahoo dot co dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 May 2005 16:21:29 -0000
- Subject: [Bug rtl-optimization/21809] New: [3.4/4.0/4.1 Regression] Floating Optimization Bug
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This problems occurs with GCC 3.4.4, gcc-4.0-20050521 snapshot and
gcc-4.1-20050528 snapshot.
test-case.c:
#include <assert,h>
volatile float x = 3;
int main()
{
float a = 1 / x;
x = a;
assert(a == x);
}
This case (test-case.c) works with gcc -O0 without a problem.
But with gcc {-O1,-O2,-O3,-Os} causes the following error:
test: test.c:9: main: Assertion 'a == x' failed'
--
Summary: [3.4/4.0/4.1 Regression] Floating Optimization Bug
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: themis_hv at yahoo dot co dot uk
CC: gcc-bugs at gcc dot gnu dot org,themis_hv at yahoo dot
co dot uk
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21809