gcc/testsuite/gfortran.dg/automatic_module_variable.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! Tests fix for PR15976 |
| 3 | ! |
| 4 | ! Error message update with patch for PR fortran/83633 |
| 5 | ! |
| 6 | module sd |
| 7 | integer, parameter :: n = 20 |
| 8 | integer :: i(n) |
| 9 | integer :: j(m) ! { dg-error "array with nonconstant bounds" } |
| 10 | integer, pointer :: p(:) |
| 11 | integer, allocatable :: q(:) |
| 12 | contains |
| 13 | function init (x, l) |
| 14 | integer :: x(l) |
| 15 | integer :: init(l) |
| 16 | init = x |
| 17 | end function init |
| 18 | end module sd |