public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/20224] New: gfortran - flags error on strange, but correct f77 program
@ 2005-02-27  6:25 dir at lanl dot gov
  2005-02-27  6:53 ` [Bug fortran/20224] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dir at lanl dot gov @ 2005-02-27  6:25 UTC (permalink / raw)
  To: gcc-bugs

I have a few old programs that do this - it is legal in f77 and actually has a
special name that I cannot recall at the moment. Absoft likes and runs it correctly.

[dir:~/tests/gfortran] dir% f77 -o jump jump.f
FORTRAN 77 Compiler 8.0a, Copyright (c) 1987-2003, Absoft Corp.
[dir:~/tests/gfortran] dir% jump
 hi
 hi
[dir:~/tests/gfortran] dir% gfortran -o jump jump.f
 In file jump.f:4

  10  continue                                                          
   1
 In file jump.f:9

                    
                   2
Error: Label at (1) is not in the same block as the GOTO statement at (2)
[dir:~/tests/gfortran] dir% cat jump.f
      program main
      do 20 i=1,2
      go to 30
  10  continue
  20  continue
      stop
  30  continue
      write(*,*) 'hi'
      goto 10
      end

-- 
           Summary: gfortran - flags error on strange, but correct f77
                    program
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dir at lanl dot gov
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: powerpc-apple-darwin7.8.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20224


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/20224] gfortran - flags error on strange, but correct f77 program
  2005-02-27  6:25 [Bug fortran/20224] New: gfortran - flags error on strange, but correct f77 program dir at lanl dot gov
@ 2005-02-27  6:53 ` pinskia at gcc dot gnu dot org
  2005-02-27  8:49 ` kargl at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-27  6:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-26 18:32 -------
Hmm, g77 just warned about it:
t.f: In program `main':
t.f:4: warning:
     10  continue
     1
t.f:9: (continued):
         goto 10
              2
Reference to label at (2) is outside block containing definition at (1)


Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |19292
              nThis|                            |
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-26 18:32:27
               date|                            |
            Version|unknown                     |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20224


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/20224] gfortran - flags error on strange, but correct f77 program
  2005-02-27  6:25 [Bug fortran/20224] New: gfortran - flags error on strange, but correct f77 program dir at lanl dot gov
  2005-02-27  6:53 ` [Bug fortran/20224] " pinskia at gcc dot gnu dot org
@ 2005-02-27  8:49 ` kargl at gcc dot gnu dot org
  2005-02-27 13:00 ` [Bug fortran/20224] gfortran - flags error on strange, but correct f66 program pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu dot org @ 2005-02-27  8:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kargl at gcc dot gnu dot org  2005-02-26 19:44 -------
This is illegal code with respect to F77.

>From ansi-x3dot9-1978-Fortran77.pdf

   11.10.8 Transfer into the Range of a Do-Loop

   Transfer of control into the range of a DO-loop from outside the range is not
   permitted.

I haven't looked in the F2003 standard, but I suspect it is also illegal.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20224


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/20224] gfortran - flags error on strange, but correct f77 program
  2005-02-27  6:25 [Bug fortran/20224] New: gfortran - flags error on strange, but correct f77 program dir at lanl dot gov
                   ` (2 preceding siblings ...)
  2005-02-27 13:00 ` [Bug fortran/20224] gfortran - flags error on strange, but correct f66 program pinskia at gcc dot gnu dot org
@ 2005-02-27 13:00 ` kargl at gcc dot gnu dot org
  2005-02-28  1:53 ` [Bug fortran/20224] gfortran - flags error on strange, but correct f66 program tobi at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu dot org @ 2005-02-27 13:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kargl at gcc dot gnu dot org  2005-02-27 00:06 -------
Here's a little more info from the F77 standard, Appendix A.

A2. Conflicts with ANSI X3.9-1966

An extremely important consideration in the preparation of this
standard was the minimization of conflicts with the previous
standard, ANSI X3.9-1966.  This standard includes changes that
create conflicts with ANSI X3.9-1966 only when such changes were
necessary to correct an error in the previous standard or to add
to the power of the FORTRAN language in a significant manner.
The following is a list of known conflicts:

(7) This standard does not permit a transfer of control into the
    range of a DO-loop from outside the range.  The range of a
    DO-loop may be entered only by the execution of a DO statement.
    ANSI X3.9-1966 permitted transfer of control into the range of
    a DO-loop under certain conditions.  This involved the concept
    referred to as "extended range of a DO."

I think that this can be closed with a WONTFIX, since there is
nothing to fix.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20224


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/20224] gfortran - flags error on strange, but correct f66 program
  2005-02-27  6:25 [Bug fortran/20224] New: gfortran - flags error on strange, but correct f77 program dir at lanl dot gov
  2005-02-27  6:53 ` [Bug fortran/20224] " pinskia at gcc dot gnu dot org
  2005-02-27  8:49 ` kargl at gcc dot gnu dot org
@ 2005-02-27 13:00 ` pinskia at gcc dot gnu dot org
  2005-02-27 13:00 ` [Bug fortran/20224] gfortran - flags error on strange, but correct f77 program kargl at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-27 13:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-27 00:10 -------
(In reply to comment #3)
> Here's a little more info from the F77 standard, Appendix A.
Hmm, people still have fortran 66 code floating around.

/me hides

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|gfortran - flags error on   |gfortran - flags error on
                   |strange, but correct f77    |strange, but correct f66
                   |program                     |program


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20224


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/20224] gfortran - flags error on strange, but correct f66 program
  2005-02-27  6:25 [Bug fortran/20224] New: gfortran - flags error on strange, but correct f77 program dir at lanl dot gov
                   ` (3 preceding siblings ...)
  2005-02-27 13:00 ` [Bug fortran/20224] gfortran - flags error on strange, but correct f77 program kargl at gcc dot gnu dot org
@ 2005-02-28  1:53 ` tobi at gcc dot gnu dot org
  2005-02-28  4:11 ` kargl at gcc dot gnu dot org
  2005-05-03  7:05 ` tkoenig at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-02-28  1:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2005-02-27 18:32 -------
Downgrading this to enhancement. 27 years of this not being allowed are a long time.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20224


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/20224] gfortran - flags error on strange, but correct f66 program
  2005-02-27  6:25 [Bug fortran/20224] New: gfortran - flags error on strange, but correct f77 program dir at lanl dot gov
                   ` (4 preceding siblings ...)
  2005-02-28  1:53 ` [Bug fortran/20224] gfortran - flags error on strange, but correct f66 program tobi at gcc dot gnu dot org
@ 2005-02-28  4:11 ` kargl at gcc dot gnu dot org
  2005-05-03  7:05 ` tkoenig at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu dot org @ 2005-02-28  4:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kargl at gcc dot gnu dot org  2005-02-27 19:49 -------
This is not an enhancement and should be given the WONTFIX status.
Re-read the excerpt from the F77 standard that I quoted.  If it
is not an outright error, then consider the implications that 
this so-called enhancement will have on optimizing DO-loops.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20224


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/20224] gfortran - flags error on strange, but correct f66 program
  2005-02-27  6:25 [Bug fortran/20224] New: gfortran - flags error on strange, but correct f77 program dir at lanl dot gov
                   ` (5 preceding siblings ...)
  2005-02-28  4:11 ` kargl at gcc dot gnu dot org
@ 2005-05-03  7:05 ` tkoenig at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-05-03  7:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tkoenig at gcc dot gnu dot org  2005-05-03 07:04 -------
Resolving as WONTFIX, as agreed.  There realy isn't a good reason
to support this.

Thomas

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20224


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-05-03  7:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-27  6:25 [Bug fortran/20224] New: gfortran - flags error on strange, but correct f77 program dir at lanl dot gov
2005-02-27  6:53 ` [Bug fortran/20224] " pinskia at gcc dot gnu dot org
2005-02-27  8:49 ` kargl at gcc dot gnu dot org
2005-02-27 13:00 ` [Bug fortran/20224] gfortran - flags error on strange, but correct f66 program pinskia at gcc dot gnu dot org
2005-02-27 13:00 ` [Bug fortran/20224] gfortran - flags error on strange, but correct f77 program kargl at gcc dot gnu dot org
2005-02-28  1:53 ` [Bug fortran/20224] gfortran - flags error on strange, but correct f66 program tobi at gcc dot gnu dot org
2005-02-28  4:11 ` kargl at gcc dot gnu dot org
2005-05-03  7:05 ` tkoenig at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).