gcc/testsuite/gfortran.dg/argument_checking_23.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-fallow-argument-mismatch" } |
| 3 | ! PR 91556 - check that only a single warning iw emitted for type |
| 4 | ! mismatch (and that the check is also done in contained procedures). |
| 5 | |
| 6 | program main |
| 7 | real :: a |
| 8 | call foo(a) ! { dg-warning "Type mismatch" } |
| 9 | contains |
| 10 | subroutine bar |
| 11 | integer :: b |
| 12 | complex :: c |
| 13 | call foo(b) ! { dg-warning "Type mismatch" } |
| 14 | call foo(c) |
| 15 | end subroutine bar |
| 16 | end program main |