1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
5 !ERROR: SAVE attribute may not be applied to dummy argument 'x'
6 !ERROR: SAVE attribute may not be applied to dummy argument 'y'
9 !ERROR: SAVE attribute may not be applied to function result 'f1'
14 !ERROR: SAVE attribute may not be applied to function result 'f2'
16 !ERROR: SAVE attribute may not be applied to dummy argument 'x'
20 !ERROR: SAVE attribute may not be applied to dummy argument 'y'
24 ! SAVE statement should not trigger the above errors
31 !ERROR: SAVE attribute may not be applied to dummy argument 'x'
32 procedure(integer), pointer, save :: x
33 !ERROR: Procedure 'y' with SAVE attribute must also have POINTER attribute
34 procedure(integer), save :: y
38 !ERROR: Explicit SAVE of 'z' is redundant due to global SAVE statement
41 procedure(integer), pointer :: x
42 !ERROR: Explicit SAVE of 'x' is redundant due to global SAVE statement
44 !ERROR: Explicit SAVE of 'y' is redundant due to global SAVE statement
52 !ERROR: No explicit type declared for 'x'
60 !ERROR: SAVE attribute was already specified on 'y'
63 !ERROR: SAVE attribute was already specified on 'x'
64 !ERROR: SAVE attribute was already specified on 'z'
69 !ERROR: 'x' appears as a COMMON block in a SAVE statement but not in a COMMON statement
75 real :: x(n
) ! OK: save statement doesn't affect x
80 !ERROR: SAVE attribute may not be applied to automatic data object 'x'