This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] PR28174 - actual args with substring refs and PR28167 - character array constructors
- From: Paul Thomas <paulthomas2 at wanadoo dot fr>
- To: Dominique Dhumieres <dominiq at lps dot ens dot fr>
- Cc: fortran at gcc dot gnu dot org
- Date: Fri, 30 Jun 2006 22:20:44 +0200
- Subject: Re: [Patch, fortran] PR28174 - actual args with substring refs and PR28167 - character array constructors
- References: <20060630113523.E60685BBA4@mailhost.lps.ens.fr>
Dominique,
Paul,
In the test gcc/testsuite/gfortran.dg/actual_array_substr_2.f90,
are you that the line:
if (all (x(:)(3:7) .eq. y)) call abort ()
should not be rather
if (any (x(:)(3:7) .ne. y)) call abort ()
? The original test fails with xlf and g95, and I do not
see why x(:)(3:7) should not be equal to y.
x(:)(3:7) should not be equal to y because y is intent(out). You could argue that the "all" should be "any" but I wanted to be sure that the odds were stacked against any accidental match of any one of the strings.
ifort and g95 transfer d(:)(5:9) to y and so fail the test. Maybe the test should not be there at all, since I guess that y is undefined when foo is called?
TIA
Dominique
Thanks for looking at the patch so closely!
Paul