1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
3 ! DATA statement errors
9 !ERROR: Default-initialized 't1x' must not be initialized in a DATA statement
12 !ERROR: Default-initialized 'ja' must not be initialized in a DATA statement
15 !ERROR: DATA statement set has more values than objects
16 data a1(1:9:2) / 6 * 1 /
18 !ERROR: DATA statement set has no value for 'a2(2_8)'
19 data (a2(k
),k
=10,1,-2) / 4 * 1 /
21 !ERROR: DATA statement implied DO loop has a step value of zero
22 data (a3(j
),j
=1,2,0)/2*333/
24 !ERROR: DATA statement designator 'a4(5_8)' is out of range
25 data (a4(j
),j
=1,5,2) /3*222/
27 real function rfunc(x
)
32 !ERROR: Procedure 'rfunc' may not be used to initialize 'rp', which is not a procedure pointer
34 procedure(rfunc
), pointer :: rpp
36 !ERROR: Data object 'rt' may not be used to initialize 'rpp', which is a procedure pointer
38 !ERROR: Initializer for 'rt' must not be a pointer
40 !ERROR: Initializer for 'rt' must not be a procedure
43 !WARNING: DATA statement value initializes 'jx' of type 'INTEGER(4)' with CHARACTER
45 !ERROR: DATA statement value could not be converted to the type 'INTEGER(4)' of the object 'jx'
47 !ERROR: DATA statement value could not be converted to the type 'INTEGER(4)' of the object 'jx'
49 !ERROR: DATA statement value 'jy' for 'jx' is not a constant