re PR fortran/36313 ([F03] {MIN,MAX}{LOC,VAL} should accept character arguments)
authorThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 3 Dec 2017 20:14:05 +0000 (20:14 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 3 Dec 2017 20:14:05 +0000 (20:14 +0000)
commit0ac7425470a37554aa4dd017afb5f90b7328c9b0
treeb31908b5003acf7307242caf1ae5698a3d2a3fb9
parentaf5ad1e2e56a91db15c1f714f5f513ad54a07eeb
re PR fortran/36313 ([F03] {MIN,MAX}{LOC,VAL} should accept character arguments)

2017-12-03  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/36313
* check.c (gfc_check_minval_maxval): Use
int_orLreal_or_char_check_f2003 for array argument.
* iresolve.c (gfc_resolve_maxval): Insert number in
function name for character arguments.
(gfc_resolve_minval): Likewise.
* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc):
Fix comment.
(gfc_conv_intrinsic_minmaxval): Resort arguments and call library
function if dealing with a character function.

2017-12-03  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/36313
* Makefile.am: Add new files for character-valued
maxval and minval.
* Makefile.in: Regenerated.
* gfortran.map: Add new functions.
* m4/iforeach-s2.m4: New file.
* m4/ifunction-s2.m4: New file.
* m4/iparm.m4: Add intitval for minval and maxval.
* m4/maxval0s.m4: New file.
* m4/maxval1s.m4: New file.
* m4/minval0s.m4: New file.
* m4/minval1s.m4: New file.
        * generated/maxval0_s1.c: New file.
        * generated/maxval0_s4.c: New file.
        * generated/maxval1_s1.c: New file.
        * generated/maxval1_s4.c: New file.
        * generated/minval0_s1.c: New file.
        * generated/minval0_s4.c: New file.
        * generated/minval1_s1.c: New file.
        * generated/minval1_s4.c: New file.

2017-12-03  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/36313
* gfortran.dg/maxval_char_1.f90: New test.
* gfortran.dg/maxval_char_2.f90: New test.
* gfortran.dg/maxval_char_3.f90: New test.
* gfortran.dg/maxval_char_4.f90: New test.
* gfortran.dg/minval_char_1.f90: New test.
* gfortran.dg/minval_char_2.f90: New test.
* gfortran.dg/minval_char_3.f90: New test.
* gfortran.dg/minval_char_4.f90: New test.

From-SVN: r255367
32 files changed:
gcc/fortran/ChangeLog
gcc/fortran/check.c
gcc/fortran/iresolve.c
gcc/fortran/trans-intrinsic.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/maxval_char_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/maxval_char_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/maxval_char_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/maxval_char_4.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/minval_char_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/minval_char_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/minval_char_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/minval_char_4.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/Makefile.am
libgfortran/Makefile.in
libgfortran/generated/maxval0_s1.c [new file with mode: 0644]
libgfortran/generated/maxval0_s4.c [new file with mode: 0644]
libgfortran/generated/maxval1_s1.c [new file with mode: 0644]
libgfortran/generated/maxval1_s4.c [new file with mode: 0644]
libgfortran/generated/minval0_s1.c [new file with mode: 0644]
libgfortran/generated/minval0_s4.c [new file with mode: 0644]
libgfortran/generated/minval1_s1.c [new file with mode: 0644]
libgfortran/generated/minval1_s4.c [new file with mode: 0644]
libgfortran/gfortran.map
libgfortran/m4/iforeach-s2.m4 [new file with mode: 0644]
libgfortran/m4/ifunction-s2.m4 [new file with mode: 0644]
libgfortran/m4/iparm.m4
libgfortran/m4/maxval0s.m4 [new file with mode: 0644]
libgfortran/m4/maxval1s.m4 [new file with mode: 0644]
libgfortran/m4/minval0s.m4 [new file with mode: 0644]
libgfortran/m4/minval1s.m4 [new file with mode: 0644]