45 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12subroutine s13 type :: t4 integer :: i5 integer :: s16 integer :: t7 end type8 !ERROR: 't' is already declared in this scoping unit9 integer :: t10 integer :: i, j11 type(t) :: x12 !ERROR: Derived type 't2' not found13 type(t2) :: y14 external :: v15 type(t) :: v, w16 external :: w17 !ERROR: 'z' is not an object of derived type; it is implicitly typed18 i = z%i19 !ERROR: 's1' is not an object and may not be used as the base of a component reference or type parameter inquiry20 i = s1%i21 !ERROR: 'j' is not an object of derived type22 i = j%i23 !ERROR: Component 'j' not found in derived type 't'24 i = x%j25 !ERROR: 'v' is not an object and may not be used as the base of a component reference or type parameter inquiry26 i = v%i27 !ERROR: 'w' is not an object and may not be used as the base of a component reference or type parameter inquiry28 i = w%i29 i = x%i !OK30end subroutine31 32subroutine s233 type :: t134 integer :: i35 end type36 type :: t237 type(t1) :: x38 end type39 type(t2) :: y40 integer :: i41 !ERROR: Component 'j' not found in derived type 't1'42 k = y%x%j43 k = y%x%i !OK44end subroutine45