[patch, libfortran][Regression] PR43265 No EOF condition if reading with '(x)' from an empty file
Jerry DeLisle
jvdelisle@verizon.net
Mon Mar 8 15:51:00 GMT 2010
On 03/08/2010 01:32 AM, Tobias Burnus wrote:
> On 03/08/2010 06:33 AM, Jerry DeLisle wrote:
>> The attached patch fixes this PR by extracting the code in read_sf
>> used by
>> read_x and putting it into read_x.
>
> Why do you allocate for
>
> + if (is_internal_unit (dtp))
> + {
> + p = mem_alloc_r (dtp->u.p.current_unit->s,&length);
> + if (unlikely (length< n))
> + n = length;
> + goto done;
> + }
>
>
> As you do not read anything with the X edit descriptor, you shouldn't
> need this...
It does not actually allocate anything, it just updates the internal pointers.
We have not rid ourselves of the old alloc interface for internal units yet.
> Related to the bugreport, though slightly different: The following
> program compiles& runs with NAG f95, ifort, and Open64, but shows an
> EOF error with gfortran:
>
I will have a look at these: Thanks for comments.
Jerry
More information about the Gcc-patches
mailing list