allocatable_dummy_2.f90

来自「用于进行gcc测试」· F90 代码 · 共 29 行

F90
29
字号
! { dg-do compile }! Check a few constraints for ALLOCATABLE dummy arguments.program alloc_dummy    implicit none    integer :: a(5)    call init(a) ! { dg-error "must be ALLOCATABLE" }contains    subroutine init(x)        integer, allocatable, intent(out) :: x(:)    end subroutine init    subroutine init2(x)        integer, allocatable, intent(in) :: x(:)        allocate(x(3)) ! { dg-error "Cannot allocate" }    end subroutine init2    subroutine kill(x)        integer, allocatable, intent(in) :: x(:)                deallocate(x) ! { dg-error "Cannot deallocate" }    end subroutine killend program alloc_dummy

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?