common_errors_1.f90

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

F90
39
字号
! { dg-do compile }! Tests a number of error messages relating to derived type objects! in common blocks.  Originally due to PR 33198subroutine onetype a   sequence   integer :: i = 1end type atype(a) :: t ! { dg-error "Derived type variable .t. in COMMON at ... may not have default initializer" }common /c/ tendsubroutine firsttype a   integer :: i   integer :: jend type atype(a) :: t  ! { dg-error "Derived type variable .t. in COMMON at ... has neither the SEQUENCE nor the BIND.C. attribute" }common /c/ tendsubroutine primetype a   sequence   integer, allocatable :: i(:)   integer :: jend type atype(a) :: t  ! { dg-error "Derived type variable .t. in COMMON at ... has an ultimate component that is allocatable" }common /c/ tendsubroutine sourceparameter(x=0.) ! { dg-error "COMMON block .x. at ... is used as PARAMETER at ..." }common /x/ i  ! { dg-error "COMMON block .x. at ... is used as PARAMETER at ..." }intrinsic sincommon /sin/ j ! { dg-error "COMMON block .sin. at ... is also an intrinsic procedure" }end subroutine source

⌨️ 快捷键说明

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