2017-11-22 Thomas Koenig <tkoenig@gcc.gnu.org>
commiteab3d206dca5956dd74babacbad6b4ec2b4903f9
authortkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Nov 2017 18:08:07 +0000 (22 18:08 +0000)
committertkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Nov 2017 18:08:07 +0000 (22 18:08 +0000)
treea56711799c15dbdca3426f951fa31ef645b06e75
parent1e10e74f30a5e820e6e574d50c5e2c5074284962
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255070 138bc75d-0d04-0410-961f-82ee72b054a4
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 [copied from libgfortran/m4/ifunction.m4 with 65% similarity]
libgfortran/generated/maxloc1_16_s4.c [copied from libgfortran/m4/ifunction.m4 with 65% similarity]
libgfortran/generated/maxloc1_4_s1.c [copied from libgfortran/m4/ifunction.m4 with 65% similarity]
libgfortran/generated/maxloc1_4_s4.c [copied from libgfortran/m4/ifunction.m4 with 65% similarity]
libgfortran/generated/maxloc1_8_s1.c [copied from libgfortran/m4/ifunction.m4 with 65% similarity]
libgfortran/generated/maxloc1_8_s4.c [copied from libgfortran/m4/ifunction.m4 with 65% similarity]
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 [copied from libgfortran/m4/ifunction.m4 with 65% similarity]
libgfortran/generated/minloc1_16_s4.c [copied from libgfortran/m4/ifunction.m4 with 65% similarity]
libgfortran/generated/minloc1_4_s1.c [copied from libgfortran/m4/ifunction.m4 with 65% similarity]
libgfortran/generated/minloc1_4_s4.c [copied from libgfortran/m4/ifunction.m4 with 65% similarity]
libgfortran/generated/minloc1_8_s1.c [copied from libgfortran/m4/ifunction.m4 with 65% similarity]
libgfortran/generated/minloc1_8_s4.c [copied from libgfortran/m4/ifunction.m4 with 65% similarity]
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 [copied from libgfortran/m4/ifunction.m4 with 91% similarity]
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]