derived_function_interface_1.f90
来自「用于进行gcc测试」· F90 代码 · 共 46 行
F90
46 行
! { dg-do compile }! Tests the fix for PR29634, in which an ICE would occur in the! interface declaration of a function with an 'old-style' type! declaration. When fixed, it was found that the error message! was not very helpful - this was fixed.!! Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>!module kinds type foo integer :: i end type fooend moduletype(foo) function ext_fun() use kinds ext_fun%i = 1end function ext_fun use kinds interface fun_interface type(foo) function fun() use kinds end function fun end interface interface ext_fun_interface type(foo) function ext_fun() use kinds end function ext_fun end interface type(foo) :: x x = ext_fun () print *, x%icontains type(foo) function fun() ! { dg-error "already has an explicit interface" } end function fun ! { dg-error "Expecting END PROGRAM" }end ! { dg-warning "CONTAINS statement without FUNCTION or SUBROUTINE statement" }! { dg-final { cleanup-modules "kinds" } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?