[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54390] liboctave/external incompatibilities w
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #54390] liboctave/external incompatibilities with upcoming Fortran 2018 |
Date: |
Thu, 26 Jul 2018 19:20:03 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0 |
Follow-up Comment #2, bug #54390 (project octave):
I've started going through these and converting them to a more consistent loop
syntax, just to see what the diff looks like and make sure that the changes
can be done to silence these warnings.
Let's assume that we are ok with taking ownership of these Fortran soruces and
amending them to keep up with evolving Fortran language standards. Does anyone
(jwe, anyone else?) have any preference for a consistent style to use when
converting these DO loops?
Specifically, the code in question has loops in this form that need to be
updated to modern Fortran syntax
DO 50 I=1,N
50 Z(I) = X(I)
Does the following equivalent code look better
DO I=1,N
50 Z(I) = X(I)
END DO
The advantage of this change is that it retains the label 50, just in case
there is a jump anywhere else in the code that depends on the label. It also
uses the END DO syntax, which I think is the preferred modern Fortran syntax
for ending a DO loop.
Howveer, a lot of this older Fortran code also contains DO loops that are
written like this, which *is* still allowed in Fortran 2018
DO 60 I=1,N
Z(I) = X(I)
60 CONTINUE
If we use the former change, then we'll end up with two different styles of DO
loops in the same source file. The second syntax should be safe as long as
there are no GO TO or other jump commands that use the label that was
previously inside the loop.
I'm testing a mix of these changes for now and so far gfortran likes the
changes.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?54390>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #54390] liboctave/external incompatibilities with upcoming Fortran 2018, Mike Miller, 2018/07/26
- [Octave-bug-tracker] [bug #54390] liboctave/external incompatibilities with upcoming Fortran 2018, Rik, 2018/07/26
- [Octave-bug-tracker] [bug #54390] liboctave/external incompatibilities with upcoming Fortran 2018,
Mike Miller <=
- [Octave-bug-tracker] [bug #54390] liboctave/external incompatibilities with upcoming Fortran 2018, Mike Miller, 2018/07/26
- [Octave-bug-tracker] [bug #54390] liboctave/external incompatibilities with upcoming Fortran 2018, Rik, 2018/07/26
- [Octave-bug-tracker] [bug #54390] liboctave/external incompatibilities with upcoming Fortran 2018, Mike Miller, 2018/07/26
- [Octave-bug-tracker] [bug #54390] liboctave/external incompatibilities with upcoming Fortran 2018, Carlo de Falco, 2018/07/26
- [Octave-bug-tracker] [bug #54390] liboctave/external incompatibilities with upcoming Fortran 2018, Mike Miller, 2018/07/26
- [Octave-bug-tracker] [bug #54390] liboctave/external incompatibilities with upcoming Fortran 2018, Mike Miller, 2018/07/26
- [Octave-bug-tracker] [bug #54390] liboctave/external incompatibilities with upcoming Fortran 2018, John W. Eaton, 2018/07/27
- [Octave-bug-tracker] [bug #54390] liboctave/external incompatibilities with upcoming Fortran 2018, John W. Eaton, 2018/07/27
- [Octave-bug-tracker] [bug #54390] liboctave/external incompatibilities with upcoming Fortran 2018, Rik, 2018/07/27