From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7858 invoked by alias); 30 Jun 2012 01:35:27 -0000 Received: (qmail 7748 invoked by uid 22791); 30 Jun 2012 01:35:26 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED,TW_JV X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 30 Jun 2012 01:35:14 +0000 From: "jvdelisle at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/53796] I/O INQUIRE of RECL: If not specified in OPEN, the default value should be returned (sequential access) Date: Sat, 30 Jun 2012 01:35:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jvdelisle at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-06/txt/msg02002.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53796 --- Comment #11 from Jerry DeLisle 2012-06-30 01:35:12 UTC --- Maybe a new PR for this is in order. gdb output with test case in Comment #9 (gdb) 634 if (flags->form == FORM_FORMATTED) (gdb) 636 if ((opp->common.flags & IOPARM_OPEN_HAS_RECL_IN)) (gdb) 637 fbuf_init (u, u->recl); (gdb) _gfortrani_fbuf_init (u=u@entry=0x6eea60, len=-1) at ../../../trunk/libgfortran/io/fbuf.c:38 38 { (gdb) 39 if (len == 0) (gdb) 38 { (gdb) 39 if (len == 0) (gdb) 42 u->fbuf = xmalloc (sizeof (struct fbuf)); (gdb) _gfortrani_xmalloc (n=n@entry=24) at ../../../trunk/libgfortran/runtime/memory.c:33 33 { (gdb) I need to peak at u-recl to see what it is here. 37 n = 1; (gdb) 39 p = malloc (n); (gdb) 41 if (p == NULL) (gdb) 45 } (gdb) _gfortrani_fbuf_init (u=u@entry=0x6eea60, len=-1) at ../../../trunk/libgfortran/io/fbuf.c:43 43 u->fbuf->buf = xmalloc (len); (gdb) 42 u->fbuf = xmalloc (sizeof (struct fbuf)); (gdb) 43 u->fbuf->buf = xmalloc (len); (gdb) _gfortrani_xmalloc (n=n@entry=18446744073709551615) at ../../../trunk/libgfortran/runtime/memory.c:33 33 { (gdb) 37 n = 1; (gdb) 39 p = malloc (n); (gdb) 41 if (p == NULL) (gdb) 42 os_error ("Memory allocation failed"); (gdb) _gfortrani_os_error (message=message@entry=0x4b6a6d "Memory allocation failed") at ../../../trunk/libgfortran/runtime/error.c:294 294 { (gdb)