| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! TS 29113 |
| 4 |
! The definition of TKR compatible in paragraph 2 of subclause 12.4.3.4.5 |
| 5 |
! of ISO/IEC 1539-1:2010 is changed to: |
| 6 |
! |
| 7 |
! A dummy argument is type, kind, and rank compatible, or TKR compatible, |
| 8 |
! with another dummy argument if the first is type compatible with the |
| 9 |
! second, the kind type parameters of the first have the same values as |
| 10 |
! the corresponding kind type parameters of the second, and both have the |
| 11 |
! same rank or either is assumed-rank. |
| 12 |
! |
| 13 |
! This test file contains tests that are expected to issue diagnostics |
| 14 |
! for invalid code. |
| 15 |
|
| 16 |
module m |
| 17 |
|
| 18 |
interface foo |
| 19 |
subroutine foo_1 (x) ! { dg-error "Ambiguous interfaces" } |
| 20 |
integer :: x(..) |
| 21 |
end subroutine |
| 22 |
subroutine foo_2 (x) ! { dg-error "Ambiguous interfaces" } |
| 23 |
integer :: x(:, :) |
| 24 |
end subroutine |
| 25 |
end interface |
| 26 |
|
| 27 |
interface bar |
| 28 |
subroutine bar_1 (x) ! { dg-error "Ambiguous interfaces" } |
| 29 |
integer :: x(..) |
| 30 |
end subroutine |
| 31 |
subroutine bar_2 (x) ! { dg-error "Ambiguous interfaces" } |
| 32 |
integer :: x(..) |
| 33 |
end subroutine |
| 34 |
end interface |
| 35 |
|
| 36 |
interface baz |
| 37 |
subroutine baz_1 (x) ! { dg-error "Ambiguous interfaces" } |
| 38 |
integer :: x |
| 39 |
end subroutine |
| 40 |
subroutine baz_2 (x) ! { dg-error "Ambiguous interfaces" } |
| 41 |
integer :: x(..) |
| 42 |
end subroutine |
| 43 |
end interface |
| 44 |
|
| 45 |
end module |
| 46 |
|