]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR fortran/97272 - Wrong answer from MAXLOC with character arg
authorHarald Anlauf <anlauf@gmx.de>
Sun, 4 Oct 2020 18:24:29 +0000 (20:24 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Thu, 8 Oct 2020 16:41:02 +0000 (18:41 +0200)
commitd4ec0a15afb7538247206aa9936071544fd860f8
tree21f553588a0c102b160dfcc911c5dd2e0a64c936
parent11af9c329ae528abb8c69ae8fae96a0f3fc6ed87
PR fortran/97272 - Wrong answer from MAXLOC with character arg

The optional KIND argument to the MINLOC/MAXLOC intrinsic must not be
passed to the library function, as the kind conversion of the result
is treated explicitly elsewhere.

gcc/fortran/ChangeLog:

PR fortran/97272
* trans-intrinsic.c (strip_kind_from_actual): Helper function for
removal of KIND argument.
(gfc_conv_intrinsic_minmaxloc): Ignore KIND argument here, as it
is treated elsewhere.

gcc/testsuite/ChangeLog:

PR fortran/97272
* gfortran.dg/pr97272.f90: New test.

(cherry picked from commit 35d2c6b6e8a7448a84abbf967feeb78a29117014)
gcc/fortran/trans-intrinsic.c
gcc/testsuite/gfortran.dg/pr97272.f90 [new file with mode: 0644]