From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26442 invoked by alias); 27 Jan 2007 21:38:49 -0000 Received: (qmail 26423 invoked by uid 48); 27 Jan 2007 21:38:40 -0000 Date: Sat, 27 Jan 2007 21:38:00 -0000 Message-ID: <20070127213840.26422.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/30617] recursive I/O hangs under OSX 10.3 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "kargl at gcc dot gnu dot org" 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 X-SW-Source: 2007-01/txt/msg02383.txt.bz2 ------- Comment #2 from kargl at gcc dot gnu dot org 2007-01-27 21:38 ------- (In reply to comment #1) > I believe recursive IO is undefined (except maybe in some very limited > situations), but I can't locate anything in the F95 Standard that says > this. :( > Okay I found the relevant passage. 9.7 Restrictions on function references and list items A function reference shall not appear in an expression anywhere in an input/output statement if such a reference causes another input/output statement to be executed. I believe your "print *, fun()" is nonconforming. Note F2003 changes the restrictions of recursive IO. It may take a long time before gfortran supports this. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30617