xref: /llvm-project/flang/test/Semantics/pdt01.f90 (revision 73a0ae021ec6112911b98025055b8a2e881b1376)
1! RUN: %python %S/test_errors.py %s %flang_fc1
2! Catch error instead of crashing with infinite recursion
3! when a LEN PDT from one type is being used to define a
4! LEN PDT in another type's instantiation.
5program main
6  type t1(lp)
7    integer, len :: lp
8  end type
9  type t2(lp)
10    integer, len :: lp
11    type(t1(lp)) :: c
12  end type
13  integer local
14  !ERROR: Invalid specification expression: reference to local entity 'local'
15  type(t2(local)) :: x
16end
17