--- Comment #6 from burnus at gcc dot gnu dot org 2009-03-28 21:40 ---
FIXED on the trunk (4.5):
$ gfortran -fcheck=do test.f90
$ ./a.out
At line 4 of file test.f90
Fortran runtime error: Loop variable has been modified
The error location is not the best but it works reliably and witho
--- Comment #5 from burnus at gcc dot gnu dot org 2009-03-28 21:39 ---
Subject: Bug 34656
Author: burnus
Date: Sat Mar 28 21:39:26 2009
New Revision: 145210
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145210
Log:
2009-03-28 Tobias Burnus
PR fortran/34656
*
--- Comment #4 from tkoenig at gcc dot gnu dot org 2008-01-04 09:20 ---
We don't violate a constraint by not detecting this,
but it sure would be a useful enhancement.
--
tkoenig at gcc dot gnu dot org changed:
What|Removed |Added
-
--- Comment #3 from burnus at gcc dot gnu dot org 2008-01-04 07:12 ---
NAG f95 does not even detect this at run time! However, I think it should be
relatively easyly detectable at run time.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34656
--- Comment #2 from jv244 at cam dot ac dot uk 2008-01-04 07:02 ---
(In reply to comment #1)
> This is almost impossible to diagnose. Do you know of any compiler that
> detects this?
I think that lahey detects this at runtime. Almost all compilers detect the
simple case of directly (i.
--- Comment #1 from steven at gcc dot gnu dot org 2008-01-03 21:51 ---
This is almost impossible to diagnose. Do you know of any compiler that
detects this?
The only way I see to diagnose this, is to mark all do loop variables as such,
and warn about all assignments to such variables i