• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1! RUN: %S/test_errors.sh %s %t %f18
2MODULE test
3SAVE
4CONTAINS
5PURE FUNCTION pf( )
6   IMPLICIT NONE
7   INTEGER :: pf
8   INTEGER :: mc
9   !OK: SAVE statement is not inherited by the function
10END FUNCTION
11
12PURE FUNCTION pf2( )
13   IMPLICIT NONE
14   SAVE
15   INTEGER :: pf2
16   !ERROR: A pure subprogram may not have a variable with the SAVE attribute
17   INTEGER :: mc
18END FUNCTION
19
20END MODULE
21
22