| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-std=f2018" } |
| 3 |
! PR fortran/99853 |
| 4 |
|
| 5 |
subroutine s1 () |
| 6 |
select case (.true.) ! { dg-error "Cannot convert" } |
| 7 |
case (1_8) ! { dg-error "must be of type LOGICAL" } |
| 8 |
end select |
| 9 |
end |
| 10 |
|
| 11 |
subroutine s2 () |
| 12 |
select case (.false._1) ! { dg-error "Cannot convert" } |
| 13 |
case (2:3) ! { dg-error "must be of type LOGICAL" } |
| 14 |
end select |
| 15 |
end |
| 16 |
|
| 17 |
subroutine s3 () |
| 18 |
select case (3_2) ! { dg-error "Cannot convert" } |
| 19 |
case (.false.) ! { dg-error "must be of type INTEGER" } |
| 20 |
end select |
| 21 |
end |
| 22 |
|
| 23 |
subroutine s4 (i) |
| 24 |
select case (i) ! { dg-error "Cannot convert" } |
| 25 |
case (.true._8) ! { dg-error "must be of type INTEGER" } |
| 26 |
end select |
| 27 |
end |
| 28 |
|
| 29 |
! { dg-prune-output "Cannot convert" } |