------- Comment #1 from kargl at gcc dot gnu dot org 2007-09-21 23:03 ------- The Fortran language does not guarantee the order of the evaluation of the logical expression in your IF statement. A fortran processor can try to evaluate "a(0) .gt. 0" before the "i .gt. 0" expression. Your code is broken and possibly illegal Fortran. Rewrite your code as you meant:
i = 0 if ( i .gt. 0) then if (a(i) .gt. 0 ) then i = i + 1 write(*,*) i end if end if -- kargl at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33525