diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/assumed_charlen_function_2.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/assumed_charlen_function_2.f90 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/assumed_charlen_function_2.f90 b/gcc/testsuite/gfortran.dg/assumed_charlen_function_2.f90 new file mode 100644 index 000000000..bd7d713f9 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/assumed_charlen_function_2.f90 @@ -0,0 +1,13 @@ +! { dg-do compile }
+! Tests the fix for PR25416, which ICED in gfc_conv_function_call, when
+! treating SPREAD in the statement below.
+!
+! Contributed by Ulrich Weigand <uweigand@gcc.gnu.org>
+function bug(self,strvec) result(res)
+ character(*) :: self
+ character(*), dimension(:), intent(in) :: strvec
+ logical(kind=kind(.true.)) :: res
+
+ res = any(index(strvec,spread(self,1,size(strvec))) /= 0)
+end function
+
|