📄 used_types_3.f90
字号:
! { 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -