diff mbox

[libfortran] Fix PR 30162, write with pipes

Message ID 50CC5A5B.8030603@netcologne.de
State New
Headers show

Commit Message

Thomas Koenig Dec. 15, 2012, 11:09 a.m. UTC
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  <tkoenig@gcc.gnu.org>

         PR libfortran/30162
         * io/unix.c (raw_tell):  If the lseek is done on a
         non-seekable file, return 0.

Comments

Janus Weil Dec. 15, 2012, 12:32 p.m. UTC | #1
Hi Thomas,

wrong patch attached? It contains a hunk in frontend-passes.c, which
seems totally unrelated ...

Cheers,
Janus



2012/12/15 Thomas Koenig <tkoenig@netcologne.de>:
> 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  <tkoenig@gcc.gnu.org>
>
>         PR libfortran/30162
>         * io/unix.c (raw_tell):  If the lseek is done on a
>         non-seekable file, return 0.
>
diff mbox

Patch

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)