1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Check for semantic errors in NULLIFY statements
4 INTEGER, PARAMETER :: maxvalue
=1024
13 Type(t
),Allocatable
:: x(:)
16 Procedure(Real) :: prp
19 !ERROR: 'p' may not appear in NULLIFY
20 !BECAUSE: 'p' is not a pointer
23 !ERROR: 'pi' may not appear in NULLIFY
24 !BECAUSE: 'pi' is not a pointer
27 !ERROR: 'prp' may not appear in NULLIFY
28 !BECAUSE: 'prp' is not a pointer
31 !ERROR: 'maxvalue' may not appear in NULLIFY
32 !BECAUSE: 'maxvalue' is not a pointer
37 ! Make sure that the compiler doesn't crash when NULLIFY is used in a context
38 ! that has reported errors
42 integer, pointer :: ptrFun
46 !ERROR: 'ptrfun' was not declared a separate module procedure
47 !ERROR: 'ptrfun' is already declared in this scoping unit
48 module function ptrFun()
49 integer, pointer :: ptrFun
52 !ERROR: 'realvar' may not appear in NULLIFY
53 !BECAUSE: 'realvar' is not a pointer