1 ! RUN: %python %S/test_errors.py %s %flang_fc1
6 !WARNING: Attribute 'MODULE' cannot be used more than once
7 module pure
module real function moduleFunc()
8 end function moduleFunc
13 ! C1543 A prefix shall contain at most one of each prefix-spec.
15 ! R1535 subroutine-stmt is
16 ! [prefix] SUBROUTINE subroutine-name [ ( [dummy-arg-list] )
17 ! [proc-language-binding-spec] ]
20 ! prefix-spec[prefix-spec]...
22 ! prefix-spec values are:
23 ! declaration-type-spec, ELEMENTAL, IMPURE, MODULE, NON_RECURSIVE,
26 !ERROR: FUNCTION prefix cannot specify the type more than once
27 real pure
real function realFunc()
30 !WARNING: Attribute 'ELEMENTAL' cannot be used more than once
31 elemental
real elemental
function elementalFunc(x
)
34 end function elementalFunc
36 !WARNING: Attribute 'IMPURE' cannot be used more than once
37 impure
real impure
function impureFunc()
38 end function impureFunc
40 !WARNING: Attribute 'PURE' cannot be used more than once
41 pure
real pure
function pureFunc()
44 !ERROR: Attributes 'PURE' and 'IMPURE' conflict with each other
45 impure
real pure
function impurePureFunc()
46 end function impurePureFunc
48 !WARNING: Attribute 'RECURSIVE' cannot be used more than once
49 recursive real recursive function recursiveFunc()
50 end function recursiveFunc
52 !WARNING: Attribute 'NON_RECURSIVE' cannot be used more than once
53 non_recursive
real non_recursive
function non_recursiveFunc()
54 end function non_recursiveFunc
56 !ERROR: Attributes 'RECURSIVE' and 'NON_RECURSIVE' conflict with each other
57 non_recursive
real recursive function non_recursiveRecursiveFunc()
58 end function non_recursiveRecursiveFunc