From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23777 invoked by alias); 28 Jul 2014 08:13:09 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 23721 invoked by uid 48); 28 Jul 2014 08:13:05 -0000 From: "Joost.VandeVondele at mat dot ethz.ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/61933] New: Inquire on internal units Date: Mon, 28 Jul 2014 08:13:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: Joost.VandeVondele at mat dot ethz.ch X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-07/txt/msg01802.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61933 Bug ID: 61933 Summary: Inquire on internal units Product: gcc Version: 4.10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: Joost.VandeVondele at mat dot ethz.ch It would be nice if the the following code > cat test.f90 LOGICAL :: file_exists INQUIRE(UNIT=-1,EXIST=file_exists) WRITE(6,*) file_exists END would error out at runtime, since F2008: If le-unit-number identies an internal unit (9.6.4.8.3), an error condition occurs. F2003: The value of file-unit-number shall be nonnegative or equal to one of the named constants INPUT UNIT, 9 OUTPUT UNIT, or ERROR UNIT of the ISO FORTRAN ENV intrinsic module (13.8.2). The Cray compiler generates an error in this case: lib-4017 : UNRECOVERABLE library error The INQUIRE statement must not specify an internal file.