1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Test error message priorities for DATA problems
6 integer, pointer :: usePtr(:)
11 function f(hostDummy
, hostProc
) result(hostResult
)
12 integer hostDummy
, hostResult
14 integer hostAuto(hostDummy
)
15 integer, allocatable
:: hostAlloc
16 integer :: hostInit
= 1
17 integer, pointer :: hostPtr(:)
19 subroutine test(innerDummy
, innerProc
)
22 integer innerAuto(innerDummy
)
23 integer, allocatable
:: innerAlloc
24 integer :: innerInit
= 1
25 integer, pointer :: innerPtr(:)
26 !ERROR: Procedure 'useproc' must not be initialized in a DATA statement
28 !ERROR: Procedure 'hostproc' must not be initialized in a DATA statement
30 !ERROR: Procedure 'innerproc' must not be initialized in a DATA statement
32 !ERROR: Host-associated object 'hostdummy' must not be initialized in a DATA statement
34 !ERROR: Host-associated object 'hostresult' must not be initialized in a DATA statement
36 !ERROR: Host-associated object 'hostauto' must not be initialized in a DATA statement
38 !ERROR: Host-associated object 'hostalloc' must not be initialized in a DATA statement
40 !ERROR: Host-associated object 'hostinit' must not be initialized in a DATA statement
42 !ERROR: Host-associated object 'hostptr' must not be initialized in a DATA statement
44 !ERROR: USE-associated object 'usealloc' must not be initialized in a DATA statement
46 !ERROR: USE-associated object 'useptr' must not be initialized in a DATA statement
48 !ERROR: Dummy argument 'innerdummy' must not be initialized in a DATA statement
50 !ERROR: Automatic variable 'innerauto' must not be initialized in a DATA statement
52 !ERROR: Allocatable 'inneralloc' must not be initialized in a DATA statement
54 !ERROR: Default-initialized 'innerinit' must not be initialized in a DATA statement
56 !ERROR: Target of pointer 'innerptr' must not be initialized in a DATA statement