gcc/libgfortran/m4
Thomas Koenig 64b1806b2d re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=)
2018-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/54613
	* gfortran.h (gfc_check_f): Rename f4ml to f5ml.
	(gfc_logical_4_kind): New macro
	* intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
	(gfc_simplify_maxloc): Likewise.
	(gfc_resolve_maxloc): Likewise.
	(gfc_resolve_minloc): Likewise.
	* check.c (gfc_check_minloc_maxloc): Add checking for "back"
	argument; also raise error if it is used (for now). Add it
	if it isn't present.
	* intrinsic.c (add_sym_4ml): Rename to
	(add_sym_5ml), adjust for extra argument.
	(add_functions): Add "back" constant. Adjust maxloc and minloc
	for back argument.
	* iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
	not of gfc_logical_4_kind, convert.
	(gfc_resolve_minloc): Likewise.
	* simplify.c (gfc_simplify_minloc): Add back argument.
	(gfc_simplify_maxloc): Likewise.
	* trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
	argument to %VAL to ensure passing by value.
	(gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
	also for library calls.

2018-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/54613
	* m4/iparm.m4: Add back_arg macro if in minloc or maxloc.
	* m4/iforeach-s.m4: Add optional argument back with back_arg
	macro. Improve m4 quoting. If HAVE_BACK_ARG is defined, assert
	that back is non-true.
	* m4/iforeach.m4: Likewise.
	* m4/ifunction-s.m4: Likewise.
	* m4/ifunction.m4: Likewise.
	* m4/maxloc0.m4: Include assert.h
	* m4/minloc0.m4: Likewise.
	* m4/maxloc0s.m4: #define HAVE_BACK_ARG.
	* m4/minloc0s.m4: Likewise.
	* m4/maxloc1s.m4: Likewise.
	* m4/minloc1s.m4: Likewise.
	* m4/maxloc1.m4: Include assert.h, #define HAVE_BACK_ARG.
	* m4/minloc1.m4: Likewise.
	* m4/maxloc2s.m4: Add assert.h, add back_arg, assert that
	back is non-true.
	* m4/minloc2s.m4: Likewise.
	* generated/iall_i1.c: Regenerated.
	* generated/iall_i16.c: Regenerated.
	* generated/iall_i2.c: Regenerated.
	* generated/iall_i4.c: Regenerated.
	* generated/iall_i8.c: Regenerated.
	* generated/iany_i1.c: Regenerated.
	* generated/iany_i16.c: Regenerated.
	* generated/iany_i2.c: Regenerated.
	* generated/iany_i4.c: Regenerated.
	* generated/iany_i8.c: Regenerated.
	* generated/iparity_i1.c: Regenerated.
	* generated/iparity_i16.c: Regenerated.
	* generated/iparity_i2.c: Regenerated.
	* generated/iparity_i4.c: Regenerated.
	* generated/iparity_i8.c: Regenerated.
	* generated/maxloc0_16_i1.c: Regenerated.
	* generated/maxloc0_16_i16.c: Regenerated.
	* generated/maxloc0_16_i2.c: Regenerated.
	* generated/maxloc0_16_i4.c: Regenerated.
	* generated/maxloc0_16_i8.c: Regenerated.
	* generated/maxloc0_16_r10.c: Regenerated.
	* generated/maxloc0_16_r16.c: Regenerated.
	* generated/maxloc0_16_r4.c: Regenerated.
	* generated/maxloc0_16_r8.c: Regenerated.
	* generated/maxloc0_16_s1.c: Regenerated.
	* generated/maxloc0_16_s4.c: Regenerated.
	* generated/maxloc0_4_i1.c: Regenerated.
	* generated/maxloc0_4_i16.c: Regenerated.
	* generated/maxloc0_4_i2.c: Regenerated.
	* generated/maxloc0_4_i4.c: Regenerated.
	* generated/maxloc0_4_i8.c: Regenerated.
	* generated/maxloc0_4_r10.c: Regenerated.
	* generated/maxloc0_4_r16.c: Regenerated.
	* generated/maxloc0_4_r4.c: Regenerated.
	* generated/maxloc0_4_r8.c: Regenerated.
	* generated/maxloc0_4_s1.c: Regenerated.
	* generated/maxloc0_4_s4.c: Regenerated.
	* generated/maxloc0_8_i1.c: Regenerated.
	* generated/maxloc0_8_i16.c: Regenerated.
	* generated/maxloc0_8_i2.c: Regenerated.
	* generated/maxloc0_8_i4.c: Regenerated.
	* generated/maxloc0_8_i8.c: Regenerated.
	* generated/maxloc0_8_r10.c: Regenerated.
	* generated/maxloc0_8_r16.c: Regenerated.
	* generated/maxloc0_8_r4.c: Regenerated.
	* generated/maxloc0_8_r8.c: Regenerated.
	* generated/maxloc0_8_s1.c: Regenerated.
	* generated/maxloc0_8_s4.c: Regenerated.
	* generated/maxloc1_16_i1.c: Regenerated.
	* generated/maxloc1_16_i16.c: Regenerated.
	* generated/maxloc1_16_i2.c: Regenerated.
	* generated/maxloc1_16_i4.c: Regenerated.
	* generated/maxloc1_16_i8.c: Regenerated.
	* generated/maxloc1_16_r10.c: Regenerated.
	* generated/maxloc1_16_r16.c: Regenerated.
	* generated/maxloc1_16_r4.c: Regenerated.
	* generated/maxloc1_16_r8.c: Regenerated.
	* generated/maxloc1_16_s1.c: Regenerated.
	* generated/maxloc1_16_s4.c: Regenerated.
	* generated/maxloc1_4_i1.c: Regenerated.
	* generated/maxloc1_4_i16.c: Regenerated.
	* generated/maxloc1_4_i2.c: Regenerated.
	* generated/maxloc1_4_i4.c: Regenerated.
	* generated/maxloc1_4_i8.c: Regenerated.
	* generated/maxloc1_4_r10.c: Regenerated.
	* generated/maxloc1_4_r16.c: Regenerated.
	* generated/maxloc1_4_r4.c: Regenerated.
	* generated/maxloc1_4_r8.c: Regenerated.
	* generated/maxloc1_4_s1.c: Regenerated.
	* generated/maxloc1_4_s4.c: Regenerated.
	* generated/maxloc1_8_i1.c: Regenerated.
	* generated/maxloc1_8_i16.c: Regenerated.
	* generated/maxloc1_8_i2.c: Regenerated.
	* generated/maxloc1_8_i4.c: Regenerated.
	* generated/maxloc1_8_i8.c: Regenerated.
	* generated/maxloc1_8_r10.c: Regenerated.
	* generated/maxloc1_8_r16.c: Regenerated.
	* generated/maxloc1_8_r4.c: Regenerated.
	* generated/maxloc1_8_r8.c: Regenerated.
	* generated/maxloc1_8_s1.c: Regenerated.
	* generated/maxloc1_8_s4.c: Regenerated.
	* generated/maxval_i1.c: Regenerated.
	* generated/maxval_i16.c: Regenerated.
	* generated/maxval_i2.c: Regenerated.
	* generated/maxval_i4.c: Regenerated.
	* generated/maxval_i8.c: Regenerated.
	* generated/maxval_r10.c: Regenerated.
	* generated/maxval_r16.c: Regenerated.
	* generated/maxval_r4.c: Regenerated.
	* generated/maxval_r8.c: Regenerated.
	* generated/minloc0_16_i1.c: Regenerated.
	* generated/minloc0_16_i16.c: Regenerated.
	* generated/minloc0_16_i2.c: Regenerated.
	* generated/minloc0_16_i4.c: Regenerated.
	* generated/minloc0_16_i8.c: Regenerated.
	* generated/minloc0_16_r10.c: Regenerated.
	* generated/minloc0_16_r16.c: Regenerated.
	* generated/minloc0_16_r4.c: Regenerated.
	* generated/minloc0_16_r8.c: Regenerated.
	* generated/minloc0_16_s1.c: Regenerated.
	* generated/minloc0_16_s4.c: Regenerated.
	* generated/minloc0_4_i1.c: Regenerated.
	* generated/minloc0_4_i16.c: Regenerated.
	* generated/minloc0_4_i2.c: Regenerated.
	* generated/minloc0_4_i4.c: Regenerated.
	* generated/minloc0_4_i8.c: Regenerated.
	* generated/minloc0_4_r10.c: Regenerated.
	* generated/minloc0_4_r16.c: Regenerated.
	* generated/minloc0_4_r4.c: Regenerated.
	* generated/minloc0_4_r8.c: Regenerated.
	* generated/minloc0_4_s1.c: Regenerated.
	* generated/minloc0_4_s4.c: Regenerated.
	* generated/minloc0_8_i1.c: Regenerated.
	* generated/minloc0_8_i16.c: Regenerated.
	* generated/minloc0_8_i2.c: Regenerated.
	* generated/minloc0_8_i4.c: Regenerated.
	* generated/minloc0_8_i8.c: Regenerated.
	* generated/minloc0_8_r10.c: Regenerated.
	* generated/minloc0_8_r16.c: Regenerated.
	* generated/minloc0_8_r4.c: Regenerated.
	* generated/minloc0_8_r8.c: Regenerated.
	* generated/minloc0_8_s1.c: Regenerated.
	* generated/minloc0_8_s4.c: Regenerated.
	* generated/minloc1_16_i1.c: Regenerated.
	* generated/minloc1_16_i16.c: Regenerated.
	* generated/minloc1_16_i2.c: Regenerated.
	* generated/minloc1_16_i4.c: Regenerated.
	* generated/minloc1_16_i8.c: Regenerated.
	* generated/minloc1_16_r10.c: Regenerated.
	* generated/minloc1_16_r16.c: Regenerated.
	* generated/minloc1_16_r4.c: Regenerated.
	* generated/minloc1_16_r8.c: Regenerated.
	* generated/minloc1_16_s1.c: Regenerated.
	* generated/minloc1_16_s4.c: Regenerated.
	* generated/minloc1_4_i1.c: Regenerated.
	* generated/minloc1_4_i16.c: Regenerated.
	* generated/minloc1_4_i2.c: Regenerated.
	* generated/minloc1_4_i4.c: Regenerated.
	* generated/minloc1_4_i8.c: Regenerated.
	* generated/minloc1_4_r10.c: Regenerated.
	* generated/minloc1_4_r16.c: Regenerated.
	* generated/minloc1_4_r4.c: Regenerated.
	* generated/minloc1_4_r8.c: Regenerated.
	* generated/minloc1_4_s1.c: Regenerated.
	* generated/minloc1_4_s4.c: Regenerated.
	* generated/minloc1_8_i1.c: Regenerated.
	* generated/minloc1_8_i16.c: Regenerated.
	* generated/minloc1_8_i2.c: Regenerated.
	* generated/minloc1_8_i4.c: Regenerated.
	* generated/minloc1_8_i8.c: Regenerated.
	* generated/minloc1_8_r10.c: Regenerated.
	* generated/minloc1_8_r16.c: Regenerated.
	* generated/minloc1_8_r4.c: Regenerated.
	* generated/minloc1_8_r8.c: Regenerated.
	* generated/minloc1_8_s1.c: Regenerated.
	* generated/minloc1_8_s4.c: Regenerated.
	* generated/minval_i1.c: Regenerated.
	* generated/minval_i16.c: Regenerated.
	* generated/minval_i2.c: Regenerated.
	* generated/minval_i4.c: Regenerated.
	* generated/minval_i8.c: Regenerated.
	* generated/minval_r10.c: Regenerated.
	* generated/minval_r16.c: Regenerated.
	* generated/minval_r4.c: Regenerated.
	* generated/minval_r8.c: Regenerated.
	* generated/norm2_r10.c: Regenerated.
	* generated/norm2_r16.c: Regenerated.
	* generated/norm2_r4.c: Regenerated.
	* generated/norm2_r8.c: Regenerated.
	* generated/parity_l1.c: Regenerated.
	* generated/parity_l16.c: Regenerated.
	* generated/parity_l2.c: Regenerated.
	* generated/parity_l4.c: Regenerated.
	* generated/parity_l8.c: Regenerated.
	* generated/product_c10.c: Regenerated.
	* generated/product_c16.c: Regenerated.
	* generated/product_c4.c: Regenerated.
	* generated/product_c8.c: Regenerated.
	* generated/product_i1.c: Regenerated.
	* generated/product_i16.c: Regenerated.
	* generated/product_i2.c: Regenerated.
	* generated/product_i4.c: Regenerated.
	* generated/product_i8.c: Regenerated.
	* generated/product_r10.c: Regenerated.
	* generated/product_r16.c: Regenerated.
	* generated/product_r4.c: Regenerated.
	* generated/product_r8.c: Regenerated.
	* generated/sum_c10.c: Regenerated.
	* generated/sum_c16.c: Regenerated.
	* generated/sum_c4.c: Regenerated.
	* generated/sum_c8.c: Regenerated.
	* generated/sum_i1.c: Regenerated.
	* generated/sum_i16.c: Regenerated.
	* generated/sum_i2.c: Regenerated.
	* generated/sum_i4.c: Regenerated.
	* generated/sum_i8.c: Regenerated.
	* generated/sum_r10.c: Regenerated.
	* generated/sum_r16.c: Regenerated.
	* generated/sum_r4.c: Regenerated.
	* generated/sum_r8.c: Regenerated.

2018-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/54613
	* gfortran.dg/minmaxloc_9.f90: New test.
	* gfortran.dg/minmaxloc_10.f90: New test.
	* gfortran.dg/minmaxloc_11.f90: New test.

From-SVN: r256705
2018-01-15 18:35:13 +00:00
..
all.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
any.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
bessel.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
count.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
cshift0.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
cshift1.m4 libgfortran.h (GFC_DTYPE_COPY): New macro. 2018-01-07 14:11:11 +00:00
cshift1a.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
eoshift1.m4 libgfortran.h (GFC_DTYPE_COPY): New macro. 2018-01-07 14:11:11 +00:00
eoshift3.m4 libgfortran.h (GFC_DTYPE_COPY): New macro. 2018-01-07 14:11:11 +00:00
head.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
iall.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
iany.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
iforeach-s2.m4 re PR fortran/36313 ([F03] {MIN,MAX}{LOC,VAL} should accept character arguments) 2017-12-03 20:14:05 +00:00
iforeach-s.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-01-15 18:35:13 +00:00
iforeach.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-01-15 18:35:13 +00:00
ifunction_logical.m4 libgfortran.h (GFC_DTYPE_COPY): New macro. 2018-01-07 14:11:11 +00:00
ifunction-s2.m4 libgfortran.h (GFC_DTYPE_COPY): New macro. 2018-01-07 14:11:11 +00:00
ifunction-s.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-01-15 18:35:13 +00:00
ifunction.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-01-15 18:35:13 +00:00
in_pack.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
in_unpack.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
iparity.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
iparm.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-01-15 18:35:13 +00:00
matmul_internal.m4
matmul.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
matmulavx128.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
matmull.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
maxloc0.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-01-15 18:35:13 +00:00
maxloc0s.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-01-15 18:35:13 +00:00
maxloc1.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-01-15 18:35:13 +00:00
maxloc1s.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-01-15 18:35:13 +00:00
maxloc2s.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-01-15 18:35:13 +00:00
maxval0s.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
maxval1s.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
maxval.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
minloc0.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-01-15 18:35:13 +00:00
minloc0s.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-01-15 18:35:13 +00:00
minloc1.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-01-15 18:35:13 +00:00
minloc1s.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-01-15 18:35:13 +00:00
minloc2s.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-01-15 18:35:13 +00:00
minval0s.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
minval1s.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
minval.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
misc_specifics.m4
mtype.m4
norm2.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
pack.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
parity.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
pow.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
product.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
reshape.m4 libgfortran.h (GFC_DTYPE_COPY): New macro. 2018-01-07 14:11:11 +00:00
shape.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
specific2.m4
specific.m4
spread.m4 libgfortran.h (GFC_DTYPE_COPY): New macro. 2018-01-07 14:11:11 +00:00
sum.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
types.m4
unpack.m4 Update copyright years. 2018-01-03 11:03:58 +01:00