[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / resolve71.f90
blob51e8f07ae7057fbe249239002dd4f2076115086f
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! C708 An entity declared with the CLASS keyword shall be a dummy argument
3 ! or have the ALLOCATABLE or POINTER attribute.
4 subroutine s()
5 type :: parentType
6 end type
8 class(parentType), pointer :: pvar
9 class(parentType), allocatable :: avar
10 class(*), allocatable :: starAllocatableVar
11 class(*), pointer :: starPointerVar
12 !ERROR: CLASS entity 'barevar' must be a dummy argument or have ALLOCATABLE or POINTER attribute
13 class(parentType) :: bareVar
14 !ERROR: CLASS entity 'starvar' must be a dummy argument or have ALLOCATABLE or POINTER attribute
15 class(*) :: starVar
17 contains
18 subroutine inner(arg1, arg2, arg3, arg4, arg5)
19 class (parenttype) :: arg1, arg3
20 type(parentType) :: arg2
21 class (parenttype), pointer :: arg4
22 class (parenttype), allocatable :: arg5
23 end subroutine inner
24 end subroutine s