Bug 15322 - OPEN not parsed correctly
Summary: OPEN not parsed correctly
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: tree-ssa
: P2 normal
Target Milestone: tree-ssa
Assignee: Tobias Schlüter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-06 16:12 UTC by Tobias Schlüter
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Schlüter 2004-05-06 16:12:58 UTC
[tobi@marktplatz tests]$ cat open.f90
open(1,"name")
end
[tobi@marktplatz tests]$ gfortran open.f90
 In file open.f90:1
 
open(1,"name")
      1
Error: Syntax error in OPEN statement at (1)

The compiler should recognize the string as the FILE argument to the open statement.
Comment 1 Andrew Pinski 2004-05-06 16:32:05 UTC
hmm, IFC rejects this also:
   main program

open(1,"name")
       ^
Error 24 at (1:pr15322.f90) : syntax error

1 Error
compilation aborted for pr15322.f90 (code 1)
Comment 2 Tobias Schlüter 2004-05-06 16:57:07 UTC
Seems like Meissner's book had wrong code. Looking at the standard, I confirm
that this should be a syntax error. Closing.