1 ! RUN: %python %S/test_errors.py %s %flang_fc1
4 !ERROR: SAVE attribute may not be applied to dummy argument 'x'
5 !ERROR: SAVE attribute may not be applied to dummy argument 'y'
8 !ERROR: SAVE attribute may not be applied to function result 'f1'
13 !ERROR: SAVE attribute may not be applied to function result 'f2'
15 !ERROR: SAVE attribute may not be applied to dummy argument 'x'
19 !ERROR: SAVE attribute may not be applied to dummy argument 'y'
23 ! SAVE statement should not trigger the above errors
30 !ERROR: SAVE attribute may not be applied to dummy argument 'x'
31 procedure(integer), pointer, save :: x
32 !ERROR: Procedure 'y' with SAVE attribute must also have POINTER attribute
33 procedure(integer), save :: y
37 !WARNING: Explicit SAVE of 'z' is redundant due to global SAVE statement
40 procedure(integer), pointer :: x
41 !WARNING: Explicit SAVE of 'x' is redundant due to global SAVE statement
43 !WARNING: Explicit SAVE of 'y' is redundant due to global SAVE statement
51 !ERROR: No explicit type declared for 'x'
57 !ERROR: 'x' appears as a COMMON block in a SAVE statement but not in a COMMON statement
63 real :: x(n
) ! OK: save statement doesn't affect x
68 !ERROR: SAVE attribute may not be applied to automatic data object 'x'