This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/21809] New: [3.4/4.0/4.1 Regression] Floating Optimization Bug


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]