diff mbox series

[pushed,4/3] Fortran: Ignore KIND argument of a few more intrinsics. [PR103789]

Message ID 31266eca-1c4e-5043-e3da-b4df50c759cc@orange.fr
State New
Headers show
Series fortran: Backpoprt KIND arg of intrinsics fix [PR103789] | expand

Commit Message

Mikael Morin Jan. 17, 2022, 10:54 a.m. UTC
I managed to break a working patch by splitting it.
Now fixed.
diff mbox series

Patch

From d7a44809924297a2ff26b6b1d040c72c22f07346 Mon Sep 17 00:00:00 2001
From: Mikael Morin <mikael@gcc.gnu.org>
Date: Mon, 17 Jan 2022 11:45:46 +0100
Subject: [PATCH] Fortran: Ignore KIND argument of a few more intrinsics.
 [PR103789]

After PR97896 for which some code was added to ignore the KIND argument
of the INDEX intrinsics, and PR87711 for which that was extended to LEN_TRIM
as well, this propagates it further to MASKL, MASKR, SCAN and VERIFY.

	PR fortran/103789

gcc/fortran/ChangeLog:

	* trans-array.c (arg_evaluated_for_scalarization): Add MASKL, MASKR,
	SCAN and VERIFY to the list of intrinsics whose KIND argument is to be
	ignored.

(cherry picked from commit c1c17a43e172ebc28f2cd247f6e83c5fdbc6219f)
---
 gcc/fortran/trans-array.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 308213c57e3..dc89e97b0a1 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -11249,6 +11249,10 @@  arg_evaluated_for_scalarization (gfc_intrinsic_sym *function,
 	    {
 	      case GFC_ISYM_INDEX:
 	      case GFC_ISYM_LEN_TRIM:
+	      case GFC_ISYM_MASKL:
+	      case GFC_ISYM_MASKR:
+	      case GFC_ISYM_SCAN:
+	      case GFC_ISYM_VERIFY:
 		if (strcmp ("kind", actual_arg.name) == 0)
 		  return false;
 
-- 
2.34.1