unreferenced_use_assoc_1.f90
来自「用于进行gcc测试」· F90 代码 · 共 41 行
F90
41 行
! { dg-do compile }! Tests the fix for PR31424.!module InternalCompilerError type Byte private character(len=1) :: singleByte end type type (Byte) :: BytesPrototype(1) type UserType real :: r end typecontains function UserTypeToBytes(user) result (bytes) type(UserType) :: user type(Byte) :: bytes(size(transfer(user, BytesPrototype))) bytes = transfer(user, BytesPrototype) end function subroutine DoSomethingWithBytes(bytes) type(Byte), intent(in) :: bytes(:) end subroutineend moduleprogram main use InternalCompilerError type (UserType) :: user ! The following line caused the ICE call DoSomethingWithBytes( UserTypeToBytes(user) )end program ! { dg-final { cleanup-modules "InternalCompilerError" } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?