[Bug tree-optimization/55022] [4.8 Regression] air.f90 is miscompliled with -m64 -O2 -fgraphite-identity after revision 190619

dominiq at lps dot ens.fr gcc-bugzilla@gcc.gnu.org
Thu Feb 7 15:11:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55022

--- Comment #12 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2013-02-07 15:11:23 UTC ---
If I replace the loop
      DO i = Spx , Epx
         vn1 = U(i,Apy)*NX1(i) + V(i,Apy)*NY1(i)
         P(i,Apy) = P(i,Apy)/DEXP(GMA*vn1/AS1(i))
         U(i,Apy) = 0.0
         V(i,Apy) = 0.0
         T(i,Apy) = TWX_0
         RHO(i,Apy) = P(i,Apy)*R_0
         AS1(i) = A_0
         E(i,Apy) = E_0
         U1(i,Apy) = RHO(i,Apy)
         U2(i,Apy) = 0.0
         U3(i,Apy) = 0.0
         U4(i,Apy) = RHO(i,Apy)*E_0
      ENDDO

with

      DO i = Spx , Epx
         vn1 = GMA*(U(i,Apy)*NX1(i) + V(i,Apy)*NY1(i))/AS1(i)
         P(i,Apy) = P(i,Apy)/DEXP(vn1)
         RHO(i,Apy) = P(i,Apy)*R_0
         AS1(i) = A_0
         E(i,Apy) = E_0
         U1(i,Apy) = RHO(i,Apy)
         U4(i,Apy) = RHO(i,Apy)*E_0
      ENDDO
      U(Spx:Epx,Apy) = 0.0
      V(Spx:Epx,Apy) = 0.0
      T(Spx:Epx,Apy) = TWX_0
      U2(Spx:Epx,Apy) = 0.0
      U3(Spx:Epx,Apy) = 0.0

Then the test does not abort with NaNs, but the result seems wrong:

        1729  0.40924060378447885     
        1737  0.41934356330600248     

compared to

        1729  0.40411964185599653     
        1737  0.41528583240265665



More information about the Gcc-bugs mailing list