This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR28174 - actual args with substring refs and PR28167 - character array constructors


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]