From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19348 invoked by alias); 15 Dec 2012 11:09:27 -0000 Received: (qmail 19332 invoked by uid 22791); 15 Dec 2012 11:09:26 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cc-smtpout3.netcologne.de (HELO cc-smtpout3.netcologne.de) (89.1.8.213) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 15 Dec 2012 11:09:19 +0000 Received: from cc-smtpin3.netcologne.de (cc-smtpin3.netcologne.de [89.1.8.203]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id 323C8124D0; Sat, 15 Dec 2012 12:09:18 +0100 (CET) Received: from [192.168.0.104] (xdsl-78-35-146-188.netcologne.de [78.35.146.188]) by cc-smtpin3.netcologne.de (Postfix) with ESMTPSA id 0BF5511DC1; Sat, 15 Dec 2012 12:09:16 +0100 (CET) Message-ID: <50CC5A5B.8030603@netcologne.de> Date: Sat, 15 Dec 2012 11:09:00 -0000 From: Thomas Koenig User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: "fortran@gcc.gnu.org" , gcc-patches Subject: [patch, libfortran] Fix PR 30162, write with pipes Content-Type: multipart/mixed; boundary="------------030006020604020509030801" Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg01003.txt.bz2 This is a multi-part message in MIME format. --------------030006020604020509030801 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Content-length: 378 Hello world, the attached patch fixes the regression and regtests cleanly. No test case because I could not find anything portable to create a FIFO in the testsuite. OK for trunk and 4.7? Thomas 2012-12-15 Thomas Koenig PR libfortran/30162 * io/unix.c (raw_tell): If the lseek is done on a non-seekable file, return 0. --------------030006020604020509030801 Content-Type: text/x-patch; name="p1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="p1.diff" Content-length: 529 Index: frontend-passes.c =================================================================== --- frontend-passes.c (Revision 193793) +++ frontend-passes.c (Arbeitskopie) @@ -1277,8 +1277,12 @@ doloop_code (gfc_code **c, int *walk_subtrees ATTR break; case EXEC_CALL: - f = co->symtree->n.sym->formal; + if (co->resolved_sym == NULL) + break; + + f = co->resolved_sym->formal; + /* Withot a formal arglist, there is only unknown INTENT, which we don't check for. */ if (f == NULL) --------------030006020604020509030801--