1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! %VAL en %REF legacy extension semantic tests.
4 subroutine val_errors(array
, string
, polymorphic
, derived
)
11 type(*) :: polymorphic
17 !ERROR: %VAL argument must be a scalar numeric or logical expression
18 call foo1(%val(array
))
19 !ERROR: %VAL argument must be a scalar numeric or logical expression
20 call foo2(%val(string
))
21 !ERROR: %VAL argument must be a scalar numeric or logical expression
22 call foo3(%val(derived
))
23 !ERROR: Assumed type actual argument requires an explicit interface
24 !ERROR: %VAL argument must be a scalar numeric or logical expression
25 call foo4(%val(polymorphic
))
26 !ERROR: %VAL or %REF are not allowed for dummy argument 'a=' that must be passed by means of a descriptor
27 call foo5(%ref(array
))
35 call ok1(%val(array(1)))
43 subroutine ref_ok(array
, string
, derived
)
48 character(*) :: string
50 call rok1(%ref(array
))
51 call rok2(%ref(string
))
52 call rok3(%ref(derived
))