Quantcast
Channel: Recent posts
Viewing all articles
Browse latest Browse all 415

Request to issue an error with a deleted/removed feature when /warn:stderrors compiler option is in effect.

$
0
0

Starting with FORTRAN 77 (ANSI X3.9 1978), the so-called "extended range of a DO loop" feature has been removed.  However when an example code involving this feature is compiled using Intel Fortran with /warn:stderrors but no /f66 option, no error is issued.  Can the Intel Fortran team consider a change where an error will be issued under such a circumstance?

C Example: "Extended range of a DO Loop"
C
      INTEGER I
      INTEGER J
      J = 0
C Simulate a DO loop with "extended range" feature from
C ANSI X3.9-1966 FORTRAN
      DO 10 I = 1, 3
         PRINT *, "J = ", J
         GO TO 20
   10 CONTINUE
C Done with DO loop; control transferred to statement 99
      GO TO 99
C Simulate a collection of sequences that "extend" the DO
C Then return the control to the DO loop
   20 J = I + 1
      GO TO 10
C
   99 CONTINUE
      STOP
      END

Upon compilation,

C:Fortran>ifort /c /warn:all /warn:stderrors /stand p.for
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R
) 64, Version 17.0.1.143 Build 20161005
Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.

p.for(1): warning #7373: Fixed form source is an obsolescent feature in Fortran
2008.
C Example: "Extended range of a DO Loop"
^
p.for(17): warning #6371: A jump into a block from outside the block may have oc
curred.   [10]
      GO TO 10
------------^

Please note with gfortran for the same code, one gets:

    10 CONTINUE
     1
C:Fortran\p.for:11:72:
       GO TO 10
       2
Error: Legacy Extension: Label at (1) is not in the same block as the GOTO statement at (2)

Thanks,


Viewing all articles
Browse latest Browse all 415

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>