re PR fortran/36313 ([F03] {MIN,MAX}{LOC,VAL} should accept character arguments)
authorThomas Koenig <tkoenig@gcc.gnu.org>
Wed, 22 Nov 2017 18:08:07 +0000 (18:08 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Wed, 22 Nov 2017 18:08:07 +0000 (18:08 +0000)
commitddc9995b13d71d00b97cb2c4c7d5e9ef1dcbe5ea
treea56711799c15dbdca3426f951fa31ef645b06e75
parent824a2b3d8cb18e80ed11231ed57b4bf67134fcd0
re PR fortran/36313 ([F03] {MIN,MAX}{LOC,VAL} should accept character arguments)

2017-11-22  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/36313
* Makefile.am: Add i_maxloc0s_c, i_maxloc1s_c, i_maxloc2s_c,
i_minloc0s_c, i_minloc1s_c and i_minloc2s_c.
* Makefile.in: Regenerated.
        * generated/maxloc0_16_s1.c: New file.
        * generated/maxloc0_16_s4.c: New file.
        * generated/maxloc0_4_s1.c: New file.
        * generated/maxloc0_4_s4.c: New file.
        * generated/maxloc0_8_s1.c: New file.
        * generated/maxloc0_8_s4.c: New file.
        * generated/maxloc1_16_s1.c: New file.
        * generated/maxloc1_16_s4.c: New file.
        * generated/maxloc1_4_s1.c: New file.
        * generated/maxloc1_4_s4.c: New file.
        * generated/maxloc1_8_s1.c: New file.
        * generated/maxloc1_8_s4.c: New file.
        * generated/maxloc2_16_s1.c: New file.
        * generated/maxloc2_16_s4.c: New file.
        * generated/maxloc2_4_s1.c: New file.
        * generated/maxloc2_4_s4.c: New file.
        * generated/maxloc2_8_s1.c: New file.
        * generated/maxloc2_8_s4.c: New file.
        * generated/minloc0_16_s1.c: New file.
        * generated/minloc0_16_s4.c: New file.
        * generated/minloc0_4_s1.c: New file.
        * generated/minloc0_4_s4.c: New file.
        * generated/minloc0_8_s1.c: New file.
        * generated/minloc0_8_s4.c: New file.
        * generated/minloc1_16_s1.c: New file.
        * generated/minloc1_16_s4.c: New file.
        * generated/minloc1_4_s1.c: New file.
        * generated/minloc1_4_s4.c: New file.
        * generated/minloc1_8_s1.c: New file.
        * generated/minloc1_8_s4.c: New file.
        * generated/minloc2_16_s1.c: New file.
        * generated/minloc2_16_s4.c: New file.
        * generated/minloc2_4_s1.c: New file.
        * generated/minloc2_4_s4.c: New file.
        * generated/minloc2_8_s1.c: New file.
        * generated/minloc2_8_s4.c: New file.
        * m4/iforeach-s.m4: New file.
        * m4/ifunction-s.m4: New file.
        * m4/maxloc0s.m4: New file.
        * m4/maxloc1s.m4: New file.
        * m4/maxloc2s.m4: New file.
        * m4/minloc0s.m4: New file.
        * m4/minloc1s.m4: New file.
        * m4/minloc2s.m4: New file.
* gfortran.map: Add new functions.
* libgfortran.h: Add gfc_array_s1 and gfc_array_s4.

2017-11-22  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/36313
* check.c (int_or_real_or_char_check_f2003): New function.
* iresolve.c (gfc_resolve_maxloc): Add number "2" for
character arguments and rank-zero return value.
(gfc_resolve_minloc): Likewise.
* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Handle case of
character arguments and rank-zero return value by removing
unneeded arguments and calling the library function.

2017-11-22  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/36313
* gfortran.dg/maxloc_string_1.f90: New test.
* gfortran.dg/minloc_string_1.f90: New test.

From-SVN: r255070
58 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/maxloc_string_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/minloc_string_1.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/Makefile.am
libgfortran/Makefile.in
libgfortran/generated/maxloc0_16_s1.c [new file with mode: 0644]
libgfortran/generated/maxloc0_16_s4.c [new file with mode: 0644]
libgfortran/generated/maxloc0_4_s1.c [new file with mode: 0644]
libgfortran/generated/maxloc0_4_s4.c [new file with mode: 0644]
libgfortran/generated/maxloc0_8_s1.c [new file with mode: 0644]
libgfortran/generated/maxloc0_8_s4.c [new file with mode: 0644]
libgfortran/generated/maxloc1_16_s1.c [new file with mode: 0644]
libgfortran/generated/maxloc1_16_s4.c [new file with mode: 0644]
libgfortran/generated/maxloc1_4_s1.c [new file with mode: 0644]
libgfortran/generated/maxloc1_4_s4.c [new file with mode: 0644]
libgfortran/generated/maxloc1_8_s1.c [new file with mode: 0644]
libgfortran/generated/maxloc1_8_s4.c [new file with mode: 0644]
libgfortran/generated/maxloc2_16_s1.c [new file with mode: 0644]
libgfortran/generated/maxloc2_16_s4.c [new file with mode: 0644]
libgfortran/generated/maxloc2_4_s1.c [new file with mode: 0644]
libgfortran/generated/maxloc2_4_s4.c [new file with mode: 0644]
libgfortran/generated/maxloc2_8_s1.c [new file with mode: 0644]
libgfortran/generated/maxloc2_8_s4.c [new file with mode: 0644]
libgfortran/generated/minloc0_16_s1.c [new file with mode: 0644]
libgfortran/generated/minloc0_16_s4.c [new file with mode: 0644]
libgfortran/generated/minloc0_4_s1.c [new file with mode: 0644]
libgfortran/generated/minloc0_4_s4.c [new file with mode: 0644]
libgfortran/generated/minloc0_8_s1.c [new file with mode: 0644]
libgfortran/generated/minloc0_8_s4.c [new file with mode: 0644]
libgfortran/generated/minloc1_16_s1.c [new file with mode: 0644]
libgfortran/generated/minloc1_16_s4.c [new file with mode: 0644]
libgfortran/generated/minloc1_4_s1.c [new file with mode: 0644]
libgfortran/generated/minloc1_4_s4.c [new file with mode: 0644]
libgfortran/generated/minloc1_8_s1.c [new file with mode: 0644]
libgfortran/generated/minloc1_8_s4.c [new file with mode: 0644]
libgfortran/generated/minloc2_16_s1.c [new file with mode: 0644]
libgfortran/generated/minloc2_16_s4.c [new file with mode: 0644]
libgfortran/generated/minloc2_4_s1.c [new file with mode: 0644]
libgfortran/generated/minloc2_4_s4.c [new file with mode: 0644]
libgfortran/generated/minloc2_8_s1.c [new file with mode: 0644]
libgfortran/generated/minloc2_8_s4.c [new file with mode: 0644]
libgfortran/gfortran.map
libgfortran/libgfortran.h
libgfortran/m4/iforeach-s.m4 [new file with mode: 0644]
libgfortran/m4/ifunction-s.m4 [new file with mode: 0644]
libgfortran/m4/ifunction.m4
libgfortran/m4/iparm.m4
libgfortran/m4/maxloc0s.m4 [new file with mode: 0644]
libgfortran/m4/maxloc1s.m4 [new file with mode: 0644]
libgfortran/m4/maxloc2s.m4 [new file with mode: 0644]
libgfortran/m4/minloc0s.m4 [new file with mode: 0644]
libgfortran/m4/minloc1s.m4 [new file with mode: 0644]
libgfortran/m4/minloc2s.m4 [new file with mode: 0644]