27 lines · plain
1!RUN: %flang_fc1 -fsyntax-only %s 2>&1 | FileCheck %s --allow-empty2!CHECK-NOT: error:3module m4 type t5 contains6 procedure nonelemental7 generic :: operator(+) => nonelemental8 end type9 interface operator(+)10 procedure elemental11 end interface12 contains13 type(t) elemental function elemental (a, b)14 class(t), intent(in) :: a, b15 elemental = t()16 end17 type(t) function nonelemental (a, b)18 class(t), intent(in) :: a, b(:)19 nonelemental = t()20 end21end22program main23 use m24 type(t) x, y(1)25 x = x + y ! ok26end27