module_function_type_1.f90

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

F90
34
字号
! { dg-do compile }! This checks the fix for PR33295 in which the A_type in initA was! not promoted to module level and so not recognised as being the! same as that emanating directly from module a. !! Contributed by Janus Weil <jaydub66@gmail.com>!module A  type A_type    real comp  end typeend module Amodule Bcontains  function initA()    use A    implicit none    type(A_type):: initA    initA%comp=1.0  end functionend module Bprogram C  use B  use A  implicit none  type(A_type):: A_var  A_var = initA()end program C! { dg-final { cleanup-modules "A B" } }

⌨️ 快捷键说明

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