3 ! Test part of the fix for PR99124 which adds errors for class results
4 ! That violate F2018, C15100.
6 ! Contributed by Gerhard Steinmetz <gscfq@t-online.de>
13 generic
:: operator(+) => f
16 elemental
function f(a
, b
) &
17 result(c
) ! { dg-error "shall not have an ALLOCATABLE or POINTER attribute" }
18 class(t
), intent(in
) :: a
, b
19 class(t
), allocatable
:: c
22 elemental
function g(a
, b
) &
23 result(c
) ! { dg-error "shall not have an ALLOCATABLE or POINTER attribute" }
24 class(t
), intent(in
) :: a
, b
25 class(t
), pointer :: c
28 elemental
function h(a
, b
) & ! { dg-error "must have a scalar result" }
29 result(c
) ! { dg-error "must be dummy, allocatable or pointer" }
30 class(t
), intent(in
) :: a
, b