OSDN Git Service

2010-04-06 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / allocate_alloc_opt_2.f90
1 ! { dg-do compile }
2 subroutine sub(i, j, err)
3    implicit none
4    character(len=*), intent(in) :: err
5    integer, intent(in) :: j
6    integer, intent(in), allocatable :: i(:)
7    integer, allocatable :: m(:)
8    integer n
9    allocate(i(2))                    ! { dg-error "Cannot allocate" "" }
10    allocate(m(2), stat=j)            ! { dg-error "cannot be" "" }
11    allocate(m(2),stat=n,errmsg=err)  ! { dg-error "cannot be" "" }
12 end subroutine sub