You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
387 B
22 lines
387 B
! RUN: %S/test_errors.sh %s %t %f18
|
|
MODULE test
|
|
SAVE
|
|
CONTAINS
|
|
PURE FUNCTION pf( )
|
|
IMPLICIT NONE
|
|
INTEGER :: pf
|
|
INTEGER :: mc
|
|
!OK: SAVE statement is not inherited by the function
|
|
END FUNCTION
|
|
|
|
PURE FUNCTION pf2( )
|
|
IMPLICIT NONE
|
|
SAVE
|
|
INTEGER :: pf2
|
|
!ERROR: A pure subprogram may not have a variable with the SAVE attribute
|
|
INTEGER :: mc
|
|
END FUNCTION
|
|
|
|
END MODULE
|
|
|