gcc/testsuite/gfortran.dg/pr67525.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! PR fortran/67525 |
| 3 | ! Code contributed by Gerhard Steinmetz |
| 4 | ! |
| 5 | real function f(x) |
| 6 | select type (x) ! { dg-error "shall be polymorphic" } |
| 7 | end select |
| 8 | end function f |
| 9 | |
| 10 | real function g(x) |
| 11 | select type (x=>null()) ! { dg-error "shall be polymorphic" } |
| 12 | end select |
| 13 | end function g |
| 14 | |
| 15 | subroutine a(x) |
| 16 | select type (x) ! { dg-error "shall be polymorphic" } |
| 17 | end select |
| 18 | end subroutine a |