[patch, libfortran] Fix PR 36773

Tobias Burnus burnus@net-b.de
Fri Jul 18 17:25:00 GMT 2008


Hello Thomas,

Thomas Koenig wrote:
> 2008-07-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
>
> 	PR libfortran/36773
> 	* gfortran.dg/zero_sized_5.f90:  New test case.
>   
I had no time to have a closer look at your patch (though I will try to 
get it reviewed later today), however, your test case is rejected by 
other compilers with:

NAG f95 writes:
  Error: a.f90, line 11: Unacceptable rank of arg BOUNDARY to intrinsic 
EOSHIFT
  Error: a.f90, line 12: Unacceptable rank of arg BOUNDARY to intrinsic 
EOSHIFT
g95 writes:
  Error: 'boundary' argument of 'eoshift' intrinsic at (1) must be of rank 1
ifort: ditto.

Can you fix this? I mean:   c  -> c(1,:)
As a bonus, can you open either a PR or add a check to your patch?

At run time, NAG f95 prints:
  Shape mismatch (dimension 1) between ARRAY and SHIFT in CSHIFT
This is the following line:
  b = eoshift (a,(/1/))
and also:
  b = eoshift (a,(/1/), boundary=c(1,:))

I have not check this, but I'd not be surprised if NAG f95 were right. 
ifort and g95 swallow this, however. And also EOSHIFT is not CSHIFT.

Correction: The latter is rejected by ifort:

a.f90(12): error #6376: The shapes of the arguments do not conform.   
[EOSHIFT]
 b = eoshift (a,(/1/), boundary=c(1,:))
--------------------------------^

Tobias



More information about the Gcc-patches mailing list