This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [patch, libfortran] Fix PR 36773
- From: Tobias Burnus <burnus at net-b dot de>
- To: Thomas Koenig <tkoenig at netcologne dot de>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 18 Jul 2008 18:33:43 +0200
- Subject: Re: [patch, libfortran] Fix PR 36773
- References: <1216333337.3360.4.camel@meiner.onlinehome.de>
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