25 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! C708 An entity declared with the CLASS keyword shall be a dummy argument 3! or have the ALLOCATABLE or POINTER attribute.4subroutine s()5 type :: parentType6 end type7 8 class(parentType), pointer :: pvar9 class(parentType), allocatable :: avar10 class(*), allocatable :: starAllocatableVar11 class(*), pointer :: starPointerVar12 !ERROR: CLASS entity 'barevar' must be a dummy argument, allocatable, or object pointer13 class(parentType) :: bareVar14 !ERROR: CLASS entity 'starvar' must be a dummy argument, allocatable, or object pointer15 class(*) :: starVar16 17 contains18 subroutine inner(arg1, arg2, arg3, arg4, arg5)19 class (parenttype) :: arg1, arg320 type(parentType) :: arg221 class (parenttype), pointer :: arg422 class (parenttype), allocatable :: arg523 end subroutine inner24end subroutine s25