| 1 |
! { dg-do compile } |
| 2 |
! PR 119078 - there should be no warning for dummy arguments |
| 3 |
! or abstract interfaces. |
| 4 |
module x |
| 5 |
implicit none |
| 6 |
abstract interface |
| 7 |
subroutine foo() bind(c) |
| 8 |
end subroutine foo |
| 9 |
end interface |
| 10 |
interface |
| 11 |
subroutine baz() bind(c) ! { dg-warning "wrong number of arguments" } |
| 12 |
end subroutine baz |
| 13 |
end interface |
| 14 |
contains |
| 15 |
subroutine tescht(bar) bind(c) |
| 16 |
interface |
| 17 |
subroutine bar() bind(c) |
| 18 |
end subroutine bar |
| 19 |
end interface |
| 20 |
end subroutine tescht |
| 21 |
subroutine t2(bar) bind(c) |
| 22 |
procedure(foo) :: bar |
| 23 |
end subroutine t2 |
| 24 |
end module x |
| 25 |
|
| 26 |
subroutine foo(a) |
| 27 |
real :: a |
| 28 |
end subroutine foo |
| 29 |
|
| 30 |
subroutine bar(b) |
| 31 |
real :: b |
| 32 |
end subroutine bar |
| 33 |
|
| 34 |
subroutine baz(a) bind(c) ! { dg-warning "wrong number of arguments" } |
| 35 |
use iso_c_binding, only : c_int |
| 36 |
integer(c_int) :: a |
| 37 |
end subroutine baz |
| 38 |
|