URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [allocate_stat.f90] - Rev 302
Compare with Previous | Blame | View Log
! { dg-do compile }! PR fortran/32936!!function all_res()implicit nonereal, pointer :: gaininteger :: all_resallocate (gain,STAT=all_res)deallocate(gain)call bar()containssubroutine bar()real, pointer :: gain2allocate (gain2,STAT=all_res)deallocate(gain2)end subroutine barend function all_resfunction func()implicit nonereal, pointer :: gaininteger :: all_res2, funcfunc = 0entry all_res2allocate (gain,STAT=all_res2)deallocate(gain)containssubroutine testimplicit nonereal, pointer :: gain2allocate (gain2,STAT=all_res2)deallocate(gain2)end subroutine testend function funcfunction func2() result(res)implicit nonereal, pointer :: gaininteger :: resallocate (gain,STAT=func2) ! { dg-error "is not a variable" }deallocate(gain)res = 0end function func2subroutine sub()implicit noneinterfaceinteger function func2()end functionend interfacereal, pointer :: gaininteger, parameter :: res = 2allocate (gain,STAT=func2) ! { dg-error "is not a variable" }deallocate(gain)end subroutine submodule testcontainsfunction one()integer :: one, twointeger, pointer :: ptrallocate(ptr, stat=one)if(one == 0) deallocate(ptr)entry twoallocate(ptr, stat=two)if(associated(ptr)) deallocate(ptr)end function onesubroutine sub()integer, pointer :: pallocate(p, stat=one) ! { dg-error "is not a variable" }if(associated(p)) deallocate(p)allocate(p, stat=two) ! { dg-error "is not a variable" }if(associated(p)) deallocate(p)end subroutine subend module test
