1 ! RUN: %python %S/test_errors.py %s %flang_fc1
6 procedure
, nopass
:: s1
7 !ERROR: Binding name 's2' not found in this derived type
13 !ERROR: 's1' is not the name of a specific binding of this type
25 procedure
, nopass
:: s3
26 generic
, public
:: g3
=> s3
37 type, extends(t3
) :: t4
39 procedure
, nopass
:: s4
40 procedure
, nopass
:: s5
41 !ERROR: 'g3' does not have the same accessibility as its previous declaration
42 generic
, private
:: g3
=> s4
43 !ERROR: 'h3' does not have the same accessibility as its previous declaration
44 generic
, public
:: h3
=> s4
46 !ERROR: 'i3' does not have the same accessibility as its previous declaration
47 generic
, private
:: i3
=> s5
52 procedure
, nopass
:: s3
53 procedure
, nopass
:: s4
54 procedure
, nopass
:: s5
55 generic
:: g5
=> s3
, s4
56 !ERROR: 'g5' does not have the same accessibility as its previous declaration
57 generic
, public
:: g5
=> s5
67 ! Test forward reference in type-bound generic to binding is allowed
73 procedure
, nopass
:: s1
74 procedure
, nopass
:: s2
80 procedure
, nopass
:: p1
=> s1
81 procedure
, nopass
:: p2
=> s2
90 ! C773 - duplicate binding names
96 procedure
, nopass
:: s1
97 procedure
, nopass
:: s2
98 !ERROR: Binding name 's1' was already specified for generic 'g'
113 generic
:: operator(.eq
.) => f1
114 !ERROR: Binding name 'f1' was already specified for generic 'operator(.eq.)'
115 generic
:: operator(==) => f2
, f1
118 logical function f1(x
, y
) result(result
)
119 class(t
), intent(in
) :: x
120 real, intent(in
) :: y
123 logical function f2(x
, y
) result(result
)
124 class(t
), intent(in
) :: x
125 integer, intent(in
) :: y