annotate gcc/testsuite/gfortran.dg/unreferenced_use_assoc_1.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 ! Tests the fix for PR31424.
kono
parents:
diff changeset
3 !
kono
parents:
diff changeset
4 module InternalCompilerError
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 type Byte
kono
parents:
diff changeset
7 private
kono
parents:
diff changeset
8 character(len=1) :: singleByte
kono
parents:
diff changeset
9 end type
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 type (Byte) :: BytesPrototype(1)
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 type UserType
kono
parents:
diff changeset
14 real :: r
kono
parents:
diff changeset
15 end type
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 contains
kono
parents:
diff changeset
18
kono
parents:
diff changeset
19 function UserTypeToBytes(user) result (bytes)
kono
parents:
diff changeset
20 type(UserType) :: user
kono
parents:
diff changeset
21 type(Byte) :: bytes(size(transfer(user, BytesPrototype)))
kono
parents:
diff changeset
22 bytes = transfer(user, BytesPrototype)
kono
parents:
diff changeset
23 end function
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 subroutine DoSomethingWithBytes(bytes)
kono
parents:
diff changeset
26 type(Byte), intent(in) :: bytes(:)
kono
parents:
diff changeset
27 end subroutine
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 end module
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 program main
kono
parents:
diff changeset
33 use InternalCompilerError
kono
parents:
diff changeset
34 type (UserType) :: user
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 ! The following line caused the ICE
kono
parents:
diff changeset
37 call DoSomethingWithBytes( UserTypeToBytes(user) )
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 end program