From patchwork Sat Dec 15 11:09:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [libfortran] Fix PR 30162, write with pipes Date: Sat, 15 Dec 2012 01:09:15 -0000 From: Thomas Koenig X-Patchwork-Id: 206612 Message-Id: <50CC5A5B.8030603@netcologne.de> To: "fortran@gcc.gnu.org" , gcc-patches 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. 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)