xref: /llvm-project/flang/test/Semantics/resolve76.f90 (revision 573fc6187b82290665ed7d94aa50641d06260a9e)
1! RUN: %python %S/test_errors.py %s %flang_fc1
2
3! 15.6.2.5(3)
4
5module m1
6  implicit logical(a-b)
7  interface
8    module subroutine sub1(a, b)
9      real, intent(in) :: a
10      real, intent(out) :: b
11    end
12    logical module function f()
13    end
14  end interface
15end
16submodule(m1) sm1
17contains
18  module procedure sub1
19    !ERROR: Left-hand side of assignment is not definable
20    !BECAUSE: 'a' is an INTENT(IN) dummy argument
21    a = 1.0
22    b = 2.0
23    !ERROR: No intrinsic or user-defined ASSIGNMENT(=) matches operand types REAL(4) and LOGICAL(4)
24    b = .false.
25  end
26  module procedure f
27    f = .true.
28    !ERROR: No intrinsic or user-defined ASSIGNMENT(=) matches operand types LOGICAL(4) and REAL(4)
29    f = 1.0
30  end
31end
32