5 ! Contributed by H Anlauf <anlauf@gmx.de>
7 ! Failed generate character scalar for scalarized loop for elemantal call.
15 character(len
=*), intent(in
) :: str
16 character(len
=len_trim(str
)) :: str_aux
17 character(len
=3) :: str3
= 'abc'
21 ! Compiled but did not give correct result
22 if (any (str_cmp((/'aaa','bbb'/), str
) .neqv
. [.FALSE
.,.TRUE
.])) call abort
25 if (any (str_cmp((/'bbb', 'aaa'/), str_aux
) .neqv
. [.TRUE
.,.FALSE
.])) call abort
28 if (any (str_cmp((/'bbb', 'aaa'/), str3
) .neqv
. [.FALSE
.,.FALSE
.])) call abort
29 if (any (str_cmp((/'bbb', 'aaa'/), 'aaa') .neqv
. [.FALSE
.,.TRUE
.])) call abort
33 elemental
logical function str_cmp(str1
, str2
)
34 character(len
=*), intent(in
) :: str1
35 character(len
=*), intent(in
) :: str2
36 str_cmp
= (str1
== str2
)