* [patch, libfortran] Fix PR 30162, write with pipes
@ 2012-12-15 11:09 Thomas Koenig
2012-12-15 12:32 ` Janus Weil
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Koenig @ 2012-12-15 11:09 UTC (permalink / raw)
To: fortran, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 378 bytes --]
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.
[-- Attachment #2: p1.diff --]
[-- Type: text/x-patch, Size: 529 bytes --]
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)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch, libfortran] Fix PR 30162, write with pipes
2012-12-15 11:09 [patch, libfortran] Fix PR 30162, write with pipes Thomas Koenig
@ 2012-12-15 12:32 ` Janus Weil
2012-12-15 12:44 ` Thomas Koenig
0 siblings, 1 reply; 5+ messages in thread
From: Janus Weil @ 2012-12-15 12:32 UTC (permalink / raw)
To: Thomas Koenig; +Cc: fortran, gcc-patches
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.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch, libfortran] Fix PR 30162, write with pipes
2012-12-15 12:32 ` Janus Weil
@ 2012-12-15 12:44 ` Thomas Koenig
2012-12-20 11:23 ` *ping* " Thomas Koenig
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Koenig @ 2012-12-15 12:44 UTC (permalink / raw)
To: Janus Weil; +Cc: fortran, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 679 bytes --]
Hi Janus,
Oops, right. Here is the correct one.
Regards
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.
>>
>
[-- Attachment #2: p1.diff --]
[-- Type: text/x-patch, Size: 482 bytes --]
Index: io/unix.c
===================================================================
--- io/unix.c (Revision 194507)
+++ io/unix.c (Arbeitskopie)
@@ -344,7 +344,15 @@
static gfc_offset
raw_tell (unix_stream * s)
{
- return lseek (s->fd, 0, SEEK_CUR);
+ gfc_offset x;
+ x = lseek (s->fd, 0, SEEK_CUR);
+
+ /* Non-seekable files should always be assumed to be at
+ current position. */
+ if (x == -1 && errno == ESPIPE)
+ x = 0;
+
+ return x;
}
static gfc_offset
^ permalink raw reply [flat|nested] 5+ messages in thread
* *ping* [patch, libfortran] Fix PR 30162, write with pipes
2012-12-15 12:44 ` Thomas Koenig
@ 2012-12-20 11:23 ` Thomas Koenig
2012-12-21 20:41 ` Jerry DeLisle
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Koenig @ 2012-12-20 11:23 UTC (permalink / raw)
To: fortran; +Cc: gcc-patches
Ping?
Thomas
> Hi Janus,
>
> Oops, right. Here is the correct one.
>
> Regards
>
> 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.
>>>
>>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: *ping* [patch, libfortran] Fix PR 30162, write with pipes
2012-12-20 11:23 ` *ping* " Thomas Koenig
@ 2012-12-21 20:41 ` Jerry DeLisle
0 siblings, 0 replies; 5+ messages in thread
From: Jerry DeLisle @ 2012-12-21 20:41 UTC (permalink / raw)
To: Thomas Koenig; +Cc: fortran, gcc-patches
On 12/20/2012 03:23 AM, Thomas Koenig wrote:
> Ping?
>
> Thomas
>
>> Hi Janus,
>>
>> Oops, right. Here is the correct one.
>>
Yes, OK
Regards,
Jerry
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-12-21 20:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-15 11:09 [patch, libfortran] Fix PR 30162, write with pipes Thomas Koenig
2012-12-15 12:32 ` Janus Weil
2012-12-15 12:44 ` Thomas Koenig
2012-12-20 11:23 ` *ping* " Thomas Koenig
2012-12-21 20:41 ` Jerry DeLisle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).