used_types_3.f90
来自「用于进行gcc测试」· F90 代码 · 共 59 行
F90
59 行
! { dg-do compile }! Test the fix for PR28601 in which line 55 would produce an ICE! because the rhs and lhs derived times were not identically! associated and so could not be cast.!! Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>!module modAimplicit nonesaveprivatetype, public :: typAinteger :: iend type typAtype, public :: atomtype(typA), pointer :: ofTypA(:,:)end type atomend module modA!!! re-name and re-export typA as typB:module modBuse modA, only: typB => typAimplicit nonesaveprivatepublic typBend module modB!!! mixed used of typA and typeB:module modCuse modBimplicit nonesaveprivatecontainssubroutine buggy(a)use modA, only: atom! use modB, only: typB! use modA, only: typAimplicit nonetype(atom),intent(inout) :: atarget :: a! *** end of interface ***type(typB), pointer :: ofTypB(:,:)! type(typA), pointer :: ofTypB(:,:)integer :: i,j,kofTypB => a%ofTypAa%ofTypA(i,j) = ofTypB(k,j)end subroutine buggyend module modC! { dg-final { cleanup-modules "modA modB modC" } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?