2 ! { dg-require-weak "" }
5 program foo1
! { dg-error "weak declaration of 'foo1' must be public" "" }
7 !GCC$ ATTRIBUTES weak :: foo1
14 function dar() ! { dg-error "weak declaration of 'dar' must be public" "" }
16 !GCC$ ATTRIBUTES weak :: dar
18 subroutine bar
! { dg-error "weak declaration of 'bar' must be public" "" }
19 !GCC$ ATTRIBUTES weak :: bar
24 subroutine foo3(n
) ! { dg-error "has the WEAK attribute but is a dummy argument" "" }
27 !GCC$ ATTRIBUTES weak :: n
28 real :: abc
! { dg-error "has the WEAK attribute but is a local variable" "" }
29 !GCC$ ATTRIBUTES weak :: abc