diff options
-rw-r--r-- | gcc/fortran/trans-array.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/maskl_1.f90 | 10 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/maskr_1.f90 | 10 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/scan_3.f90 | 11 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/verify_3.f90 | 11 |
5 files changed, 46 insertions, 0 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 29d0873..a77f331 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -11500,6 +11500,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", gfc_dummy_arg_get_name (*dummy_arg)) == 0) return false; /* Fallthrough. */ diff --git a/gcc/testsuite/gfortran.dg/maskl_1.f90 b/gcc/testsuite/gfortran.dg/maskl_1.f90 new file mode 100644 index 0000000..9e25c2c --- /dev/null +++ b/gcc/testsuite/gfortran.dg/maskl_1.f90 @@ -0,0 +1,10 @@ +! { dg-do compile } +! +! PR fortran/103789 +! Check the absence of ICE when generating calls to MASKL with a KIND argument. + +program p + integer :: z(2), y(2) + y = [1, 13] + z = maskl(y, kind=4) + 1 +end program p diff --git a/gcc/testsuite/gfortran.dg/maskr_1.f90 b/gcc/testsuite/gfortran.dg/maskr_1.f90 new file mode 100644 index 0000000..ebfd3db --- /dev/null +++ b/gcc/testsuite/gfortran.dg/maskr_1.f90 @@ -0,0 +1,10 @@ +! { dg-do compile } +! +! PR fortran/103789 +! Check the absence of ICE when generating calls to MASKR with a KIND argument. + +program p + integer :: z(2), y(2) + y = [1, 13] + z = maskr(y, kind=4) + 1 +end program p diff --git a/gcc/testsuite/gfortran.dg/scan_3.f90 b/gcc/testsuite/gfortran.dg/scan_3.f90 new file mode 100644 index 0000000..80262ae --- /dev/null +++ b/gcc/testsuite/gfortran.dg/scan_3.f90 @@ -0,0 +1,11 @@ +! { dg-do compile } +! +! PR fortran/103789 +! Check the absence of ICE when generating calls to SCAN with a KIND argument. + +program p + character(len=10) :: y(2) + integer :: z(2) + y = ['abc', 'def'] + z = scan(y, 'e', kind=4) + 1 +end program p diff --git a/gcc/testsuite/gfortran.dg/verify_3.f90 b/gcc/testsuite/gfortran.dg/verify_3.f90 new file mode 100644 index 0000000..f01e24e --- /dev/null +++ b/gcc/testsuite/gfortran.dg/verify_3.f90 @@ -0,0 +1,11 @@ +! { dg-do compile } +! +! PR fortran/103789 +! Check the absence of ICE when generating calls to VERIFY with a KIND argument. + +program p + character(len=10) :: y(2) + integer :: z(2) + y = ['abc', 'def'] + z = verify(y, 'e', kind=4) + 1 +end program p |