public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/43832] New: OPEN statement not diagnosing missing unit number
@ 2010-04-21 13:47 w6ws at earthlink dot net
2010-04-21 14:05 ` [Bug fortran/43832] " w6ws at earthlink dot net
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: w6ws at earthlink dot net @ 2010-04-21 13:47 UTC (permalink / raw)
To: gcc-bugs
An OPEN statement needs to either have a unit number in the first
item in the list, or have a UNIT= (or NEWUNIT= in F2008) keyword
somewhere else. Here is an example where the unit number is not
specified, yet gfortran does not issue an error:
subroutine openit
implicit none
open (file='x')
end subroutine
This was tested with version 4.4.1 on Ubuntu linux.
--
Summary: OPEN statement not diagnosing missing unit number
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: w6ws at earthlink dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43832
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/43832] OPEN statement not diagnosing missing unit number
2010-04-21 13:47 [Bug fortran/43832] New: OPEN statement not diagnosing missing unit number w6ws at earthlink dot net
@ 2010-04-21 14:05 ` w6ws at earthlink dot net
2010-04-21 14:09 ` burnus at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: w6ws at earthlink dot net @ 2010-04-21 14:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from w6ws at earthlink dot net 2010-04-21 14:05 -------
An additional test: with just an OPEN statement with no list, gfortran issues:
In file miniopen.f90:4
open ()
1
Error: Syntax error in OPEN statement at (1)
While the message is technically correct, it would be more helpful if it
mentioned the missing unit number.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43832
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/43832] OPEN statement not diagnosing missing unit number
2010-04-21 13:47 [Bug fortran/43832] New: OPEN statement not diagnosing missing unit number w6ws at earthlink dot net
2010-04-21 14:05 ` [Bug fortran/43832] " w6ws at earthlink dot net
@ 2010-04-21 14:09 ` burnus at gcc dot gnu dot org
2010-04-22 0:32 ` jvdelisle at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-04-21 14:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2010-04-21 14:09 -------
Fortran 2008 (almost FDIS version) has:
C904 (R904) If the NEWUNIT= specifier does not appear, a file-unit-number shall
be speci\fed; if
the optional characters UNIT= are omitted, the file-unit-number
shall be the \ffirst
item in the connect-spec-list.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43832
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/43832] OPEN statement not diagnosing missing unit number
2010-04-21 13:47 [Bug fortran/43832] New: OPEN statement not diagnosing missing unit number w6ws at earthlink dot net
2010-04-21 14:05 ` [Bug fortran/43832] " w6ws at earthlink dot net
2010-04-21 14:09 ` burnus at gcc dot gnu dot org
@ 2010-04-22 0:32 ` jvdelisle at gcc dot gnu dot org
2010-04-24 12:04 ` jvdelisle at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-04-22 0:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jvdelisle at gcc dot gnu dot org 2010-04-22 00:29 -------
OK , I will see what I ca ndo.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jvdelisle at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-04-22 00:29:04
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43832
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/43832] OPEN statement not diagnosing missing unit number
2010-04-21 13:47 [Bug fortran/43832] New: OPEN statement not diagnosing missing unit number w6ws at earthlink dot net
` (2 preceding siblings ...)
2010-04-22 0:32 ` jvdelisle at gcc dot gnu dot org
@ 2010-04-24 12:04 ` jvdelisle at gcc dot gnu dot org
2010-04-24 12:07 ` jvdelisle at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-04-24 12:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jvdelisle at gcc dot gnu dot org 2010-04-24 12:04 -------
Subject: Bug 43832
Author: jvdelisle
Date: Sat Apr 24 12:04:09 2010
New Revision: 158684
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158684
Log:
2010-04-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/43832
* io.c (gfc_match_open): Remove branch to syntax error. Add call to
gfc_error with new error message.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/io.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43832
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/43832] OPEN statement not diagnosing missing unit number
2010-04-21 13:47 [Bug fortran/43832] New: OPEN statement not diagnosing missing unit number w6ws at earthlink dot net
` (3 preceding siblings ...)
2010-04-24 12:04 ` jvdelisle at gcc dot gnu dot org
@ 2010-04-24 12:07 ` jvdelisle at gcc dot gnu dot org
2010-04-24 12:09 ` jvdelisle at gcc dot gnu dot org
2010-04-24 17:01 ` hp at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-04-24 12:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jvdelisle at gcc dot gnu dot org 2010-04-24 12:07 -------
Subject: Bug 43832
Author: jvdelisle
Date: Sat Apr 24 12:07:07 2010
New Revision: 158685
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158685
Log:
2010-04-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/43832
* gfortran.dg/open_nounit.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/open_nounit.f90
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43832
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/43832] OPEN statement not diagnosing missing unit number
2010-04-21 13:47 [Bug fortran/43832] New: OPEN statement not diagnosing missing unit number w6ws at earthlink dot net
` (4 preceding siblings ...)
2010-04-24 12:07 ` jvdelisle at gcc dot gnu dot org
@ 2010-04-24 12:09 ` jvdelisle at gcc dot gnu dot org
2010-04-24 17:01 ` hp at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-04-24 12:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jvdelisle at gcc dot gnu dot org 2010-04-24 12:09 -------
Fixed on trunk. Closing
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.6.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43832
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/43832] OPEN statement not diagnosing missing unit number
2010-04-21 13:47 [Bug fortran/43832] New: OPEN statement not diagnosing missing unit number w6ws at earthlink dot net
` (5 preceding siblings ...)
2010-04-24 12:09 ` jvdelisle at gcc dot gnu dot org
@ 2010-04-24 17:01 ` hp at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: hp at gcc dot gnu dot org @ 2010-04-24 17:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from hp at gcc dot gnu dot org 2010-04-24 17:01 -------
Subject: Bug 43832
Author: hp
Date: Sat Apr 24 17:00:52 2010
New Revision: 158688
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158688
Log:
PR fortran/43832
* gfortran.dg/fgetc_3.f90: Delete bogus test.
Removed:
trunk/gcc/testsuite/gfortran.dg/fgetc_3.f90
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43832
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-04-24 17:01 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-21 13:47 [Bug fortran/43832] New: OPEN statement not diagnosing missing unit number w6ws at earthlink dot net
2010-04-21 14:05 ` [Bug fortran/43832] " w6ws at earthlink dot net
2010-04-21 14:09 ` burnus at gcc dot gnu dot org
2010-04-22 0:32 ` jvdelisle at gcc dot gnu dot org
2010-04-24 12:04 ` jvdelisle at gcc dot gnu dot org
2010-04-24 12:07 ` jvdelisle at gcc dot gnu dot org
2010-04-24 12:09 ` jvdelisle at gcc dot gnu dot org
2010-04-24 17:01 ` hp 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).