1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Test that associations constructs can be correctly combined. The intrinsic
3 ! functions are not what is tested here, they are only use to reveal the types
10 class(*), allocatable
:: a
, b
15 ires
= selected_int_kind(b
)
16 ires
= selected_int_kind(a
)
20 !ERROR: Actual argument for 'x=' has bad type 'CLASS(*)'
28 !ERROR: Actual argument for 'x=' has bad type 'CLASS(*)'
33 !ERROR: Actual argument for 'x=' has bad type 'INTEGER(4)'
39 associate(y
=>1.0, x
=>1, z
=>(1.0,2.3))
40 ires
= selected_int_kind(x
)
45 !ERROR: Actual argument for 'x=' has bad type 'INTEGER(4)'
48 ires
= selected_int_kind(b
)
50 !ERROR: Actual argument for 'x=' has bad type 'INTEGER(4)'
54 ires
= selected_int_kind(b
)
55 !ERROR: No explicit type declared for 'c'
56 ires
= selected_int_kind(c
)
57 !ERROR: Actual argument for 'x=' has bad type 'CLASS(*)'
60 !ERROR: Actual argument for 'r=' has bad type 'CLASS(*)'
61 ires
= selected_int_kind(b
)
63 !ERROR: Actual argument for 'r=' has bad type 'CLASS(*)'
64 ires
= selected_int_kind(a
)
65 !ERROR: Actual argument for 'x=' has bad type 'CLASS(*)'