------- Comment #25 from dominiq at lps dot ens dot fr 2009-08-31 15:04 ------- If I compare the results of -fdump-tree-original for the first 2 cases of comment #21 I get:
[ibook-dhum] test/dbg_air% gfc -m64 -O2 -funsafe-math-optimizations -fdump-tree-original air_db.f90 [ibook-dhum] test/dbg_air% mv air_db.f90.003t.original air_db.f90.003t.original-no [ibook-dhum] test/dbg_air% gfc -m64 -O2 -funsafe-math-optimizations -fno-strict-overflow -fdump-tree-original air_db.f90 [ibook-dhum] test/dbg_air% diff -u air_db.f90.003t.original air_db.f90.003t.original-no --- air_db.f90.003t.original 2009-08-31 17:01:34.000000000 +0200 +++ air_db.f90.003t.original-no 2009-08-31 17:00:39.000000000 +0200 @@ -548,7 +548,7 @@ logical(kind=4) D.1668; ict = (integer(kind=4)) (ict + 1); - if (npx[(integer(kind=8)) i + -1] + 1 > j) + if (NON_LVALUE_EXPR <npx[(integer(kind=8)) i + -1]> >= j) { ddx[((integer(kind=8)) ict + (integer(kind=8)) k * 150) + -151] = xp1[((integer(kind=8)) (ict + 1) + (integer(kind=8)) k * 150) + -151] - xp1[((integer(kind=8)) ict + (integer(kind=8)) k * 150) + -151]; } @@ -621,7 +621,7 @@ logical(kind=4) D.1680; ict = (integer(kind=4)) (ict + 1); - if (npy[(integer(kind=8)) i + -1] + 1 > j) + if (NON_LVALUE_EXPR <npy[(integer(kind=8)) i + -1]> >= j) { ddy[((integer(kind=8)) k + (integer(kind=8)) ict * 150) + -151] = yp1[((integer(kind=8)) k + ((integer(kind=8)) ict + 1) * 150) + -151] - yp1[((integer(kind=8)) k + (integer(kind=8)) ict * 150) + -151]; } where NON_LVALUE_EXPR appear when the test is compiled without -fno-strict-overflow. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40106