blob: 6963ddc3c26209a2bff9b77558f37e1f952bdb54 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
! { dg-do compile }
! { dg-options "-fdec-structure" }
!
! Verify that the comparisons in gfc_compare_derived_types can correctly
! match nested anonymous subtypes.
!
subroutine sub0 (u)
structure /t/
structure sub
integer i
end structure
endstructure
record /t/ u
u.sub.i = 0
end subroutine sub0
subroutine sub1 ()
structure /t/
structure sub
integer i
end structure
endstructure
record /t/ u
interface
subroutine sub0 (u) ! regression: Interface mismatch.*Type mismatch
structure /t/
structure sub
integer i
end structure
endstructure
record /t/ u
end subroutine
end interface
call sub0(u) ! regression: Type mismatch in argument
end subroutine
subroutine sub2(u)
structure /tu/
union
map
integer i
end map
map
real r
end map
end union
end structure
record /tu/ u
u.r = 1.0
end subroutine
implicit none
structure /t/
structure sub
integer i
end structure
endstructure
structure /tu/
union
map
integer i
end map
map
real r
end map
end union
end structure
record /t/ u
record /tu/ u2
call sub0(u) ! regression: Type mismatch in argument
call sub1()
call sub2(u2)
end
|