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

	PR fortran/54613
	* gfortran.h (gfc_isym_id): Add GFC_ISYM_FINDLOC.
	(gfc_check_f): Add f6fl field.
	(gfc_simplify_f): Add f6 field.
	(gfc_resolve_f): Likewise.
	(gfc_type_letter): Add optional logical_equas_int flag.
	* check.c (intrinsic_type_check): New function.
	(gfc_check_findloc): New function.
	* intrinsics.c (gfc_type_letter): If logical_equals_int is
	set, act accordingly.
	(add_sym_5ml):  Reformat comment.
	(add_sym_6fl): New function.
	(add_functions): Add findloc.
	(check_arglist): Add sixth argument, handle it.
	(resolve_intrinsic): Likewise.
	(check_specific): Handle findloc.
	* intrinsic.h (gfc_check_findloc): Add prototype.
	(gfc_simplify_findloc): Likewise.
	(gfc_resolve_findloc): Likewise.
	(MAX_INTRINSIC_ARGS): Adjust.
	* iresolve.c (gfc_resolve_findloc): New function.
	* simplify.c (gfc_simplify_minmaxloc): Make static.
	(simplify_findloc_to_scalar): New function.
	(simplify_findloc_nodim): New function.
	(simplify_findloc_to_array): New function.
	(gfc_simplify_findloc): New function.
	(gfc_conv_intrinsic_findloc): New function.
	(gfc_conv_intrinsic_function): Handle GFC_ISYM_FINDLOC.
	(gfc_is_intrinsic_libcall): Likewise.

2017-10-28  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/54613
	* Makefile.am: Add files for findloc.
	* Makefile.in: Regenerated.
	* libgfortran.h (gfc_array_index_type): Add.
	(gfc_array_s1): Add using GFC_UINTEGER_1.
	(gfc_array_s4): Likewise.
	Replace unnecessary comment.
	(HAVE_GFC_UINTEGER_1): Define.
	(HAVE_GFC_UINTEGER_4): Define.
	* m4/findloc0.m4: New file.
	* m4/findloc0s.m4: New file.
	* m4/findloc1.m4: New file.
	* m4/findloc1s.m4: New file.
	* m4/findloc2s.m4: New file.
	* m4/ifindloc0.m4: New file.
	* m4/ifindloc1.m4: New file.
	* m4/ifindloc2.m4: New file.
	* m4/iparm.m4: Use unsigned integer for characters.
        * generated/findloc0_c16.c: New file.
        * generated/findloc0_c4.c: New file.
        * generated/findloc0_c8.c: New file.
        * generated/findloc0_i1.c: New file.
        * generated/findloc0_i16.c: New file.
        * generated/findloc0_i2.c: New file.
        * generated/findloc0_i4.c: New file.
        * generated/findloc0_i8.c: New file.
        * generated/findloc0_r16.c: New file.
        * generated/findloc0_r4.c: New file.
        * generated/findloc0_r8.c: New file.
        * generated/findloc0_s1.c: New file.
        * generated/findloc0_s4.c: New file.
        * generated/findloc1_c16.c: New file.
        * generated/findloc1_c4.c: New file.
        * generated/findloc1_c8.c: New file.
        * generated/findloc1_i1.c: New file.
        * generated/findloc1_i16.c: New file.
        * generated/findloc1_i2.c: New file.
        * generated/findloc1_i4.c: New file.
        * generated/findloc1_i8.c: New file.
        * generated/findloc1_r16.c: New file.
        * generated/findloc1_r4.c: New file.
        * generated/findloc1_r8.c: New file.
        * generated/findloc1_s1.c: New file.
        * generated/findloc1_s4.c: New file.
        * generated/findloc2_s1.c: New file.
        * generated/findloc2_s4.c: New file.
        * generated/maxloc0_16_s1.c: Regenerated.
        * generated/maxloc0_16_s4.c: Regenerated.
        * generated/maxloc0_4_s1.c: Regenerated.
        * generated/maxloc0_4_s4.c: Regenerated.
        * generated/maxloc0_8_s1.c: Regenerated.
        * generated/maxloc0_8_s4.c: Regenerated.
        * generated/maxloc1_16_s1.c: Regenerated.
        * generated/maxloc1_16_s4.c: Regenerated.
        * generated/maxloc1_4_s1.c: Regenerated.
        * generated/maxloc1_4_s4.c: Regenerated.
        * generated/maxloc1_8_s1.c: Regenerated.
        * generated/maxloc1_8_s4.c: Regenerated.
        * generated/maxloc2_16_s1.c: Regenerated.
        * generated/maxloc2_16_s4.c: Regenerated.
        * generated/maxloc2_4_s1.c: Regenerated.
        * generated/maxloc2_4_s4.c: Regenerated.
        * generated/maxloc2_8_s1.c: Regenerated.
        * generated/maxloc2_8_s4.c: Regenerated.
        * generated/maxval0_s1.c: Regenerated.
        * generated/maxval0_s4.c: Regenerated.
        * generated/maxval1_s1.c: Regenerated.
        * generated/maxval1_s4.c: Regenerated.
        * generated/minloc0_16_s1.c: Regenerated.
        * generated/minloc0_16_s4.c: Regenerated.
        * generated/minloc0_4_s1.c: Regenerated.
        * generated/minloc0_4_s4.c: Regenerated.
        * generated/minloc0_8_s1.c: Regenerated.
        * generated/minloc0_8_s4.c: Regenerated.
        * generated/minloc1_16_s1.c: Regenerated.
        * generated/minloc1_16_s4.c: Regenerated.
        * generated/minloc1_4_s1.c: Regenerated.
        * generated/minloc1_4_s4.c: Regenerated.
        * generated/minloc1_8_s1.c: Regenerated.
        * generated/minloc1_8_s4.c: Regenerated.
        * generated/minloc2_16_s1.c: Regenerated.
        * generated/minloc2_16_s4.c: Regenerated.
        * generated/minloc2_4_s1.c: Regenerated.
        * generated/minloc2_4_s4.c: Regenerated.
        * generated/minloc2_8_s1.c: Regenerated.
        * generated/minloc2_8_s4.c: Regenerated.
        * generated/minval0_s1.c: Regenerated.
        * generated/minval0_s4.c: Regenerated.
        * generated/minval1_s1.c: Regenerated.
        * generated/minval1_s4.c: Regenerated.

2017-10-28  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/54613
	* gfortran.dg/findloc_1.f90: New test.
	* gfortran.dg/findloc_2.f90: New test.
	* gfortran.dg/findloc_3.f90: New test.
	* gfortran.dg/findloc_4.f90: New test.
	* gfortran.dg/findloc_5.f90: New test.
	* gfortran.dg/findloc_6.f90: New test.

From-SVN: r265570
2018-10-28 11:05:05 +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 Use pointer sized array indices. 2018-01-31 16:16:22 +02:00
cshift1a.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
eoshift1.m4 Use pointer sized array indices. 2018-01-31 16:16:22 +02:00
eoshift3.m4 Use pointer sized array indices. 2018-01-31 16:16:22 +02:00
findloc0.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-10-28 11:05:05 +00:00
findloc0s.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-10-28 11:05:05 +00:00
findloc1.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-10-28 11:05:05 +00:00
findloc1s.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-10-28 11:05:05 +00:00
findloc2s.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-10-28 11:05:05 +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
ifindloc0.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-10-28 11:05:05 +00:00
ifindloc1.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-10-28 11:05:05 +00:00
ifindloc2.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-10-28 11:05:05 +00:00
iforeach-s.m4 re PR fortran/85816 (nested spread fails with "Integer overflow in xmallocarray") 2018-06-01 20:20:35 +00: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.m4 re PR fortran/85816 (nested spread fails with "Integer overflow in xmallocarray") 2018-06-01 20:20:35 +00:00
ifunction-s.m4 re PR fortran/85816 (nested spread fails with "Integer overflow in xmallocarray") 2018-06-01 20:20:35 +00:00
ifunction-s2.m4 re PR fortran/85816 (nested spread fails with "Integer overflow in xmallocarray") 2018-06-01 20:20:35 +00:00
ifunction.m4 re PR fortran/85816 (nested spread fails with "Integer overflow in xmallocarray") 2018-06-01 20:20:35 +00:00
ifunction_logical.m4 re PR fortran/85816 (nested spread fails with "Integer overflow in xmallocarray") 2018-06-01 20:20:35 +00:00
in_pack.m4 Use pointer sized array indices. 2018-01-31 16:16:22 +02:00
in_unpack.m4 Use pointer sized array indices. 2018-01-31 16:16:22 +02: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-10-28 11:05:05 +00:00
matmul.m4 Update copyright years. 2018-01-03 11:03:58 +01:00
matmul_internal.m4 re PR fortran/37802 (Improve wording for matmul bound checking) 2018-09-16 19:37:44 +00: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-05-08 07:47:19 +00:00
maxloc0s.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-05-08 07:47:19 +00:00
maxloc1.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-05-08 07:47:19 +00:00
maxloc1s.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-05-08 07:47:19 +00:00
maxloc2s.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-05-08 07:47:19 +00:00
maxval.m4 Update copyright years. 2018-01-03 11:03:58 +01: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
minloc0.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-05-08 07:47:19 +00:00
minloc0s.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-05-08 07:47:19 +00:00
minloc1.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-05-08 07:47:19 +00:00
minloc1s.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-05-08 07:47:19 +00:00
minloc2s.m4 re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=) 2018-05-08 07:47:19 +00:00
minval.m4 Update copyright years. 2018-01-03 11:03:58 +01: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
misc_specifics.m4
mtype.m4 re PR fortran/32049 (Support on x86_64 also kind=16) 2010-11-16 22:23:19 +01:00
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 re PR fortran/85816 (nested spread fails with "Integer overflow in xmallocarray") 2018-06-01 20:20:35 +00:00
shape.m4 Use pointer sized array indices. 2018-01-31 16:16:22 +02:00
specific.m4
specific2.m4
spread.m4 re PR fortran/85816 (nested spread fails with "Integer overflow in xmallocarray") 2018-06-01 20:20:35 +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