1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
3 ! Test that associations constructs can be correctly combined. The intrinsic
4 ! functions are not what is tested here, they are only use to reveal the types
11 class(*), allocatable
:: a
, b
16 ires
= selected_int_kind(b
)
17 ires
= selected_int_kind(a
)
21 !ERROR: Actual argument for 'x=' has bad type 'CLASS(*)'
29 !ERROR: Actual argument for 'x=' has bad type 'CLASS(*)'
34 !ERROR: Actual argument for 'x=' has bad type 'INTEGER(4)'
40 associate(y
=>1.0, x
=>1, z
=>(1.0,2.3))
41 ires
= selected_int_kind(x
)
46 !ERROR: Actual argument for 'x=' has bad type 'INTEGER(4)'
49 ires
= selected_int_kind(b
)
51 !ERROR: Actual argument for 'x=' has bad type 'INTEGER(4)'
55 ires
= selected_int_kind(b
)
56 !ERROR: No explicit type declared for 'c'
57 ires
= selected_int_kind(c
)
58 !ERROR: Actual argument for 'x=' has bad type 'CLASS(*)'
61 !ERROR: Actual argument for 'r=' has bad type 'CLASS(*)'
62 ires
= selected_int_kind(b
)
64 !ERROR: Actual argument for 'r=' has bad type 'CLASS(*)'
65 ires
= selected_int_kind(a
)
66 !ERROR: Actual argument for 'x=' has bad type 'CLASS(*)'