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
|
! { dg-do compile }
! Tests the fix for PR31550 in which pointers to derived type components
! were being TREE-SSA declared in the wrong order and so in the incorrect
! context.
!
! Contributed by Daniel Franke <dfranke@gcc.gnu.org>
!
MODULE class_dummy_atom_types
TYPE :: dummy_atom_list
TYPE(dummy_atom), DIMENSION(:), POINTER :: table
INTEGER :: nused
END TYPE
TYPE :: dummy_atom
TYPE(dummy_atom_private), POINTER :: p
END TYPE
TYPE :: dummy_atom_private
TYPE(dummy_atom_list) :: neighbours
END TYPE
END MODULE
MODULE class_dummy_atom_list
USE class_dummy_atom_types, ONLY: dummy_atom_list
INTERFACE
SUBROUTINE dummy_atom_list_init_copy(this, other)
USE class_dummy_atom_types, ONLY: dummy_atom_list
TYPE(dummy_atom_list), INTENT(out) :: this
TYPE(dummy_atom_list), INTENT(in) :: other
END SUBROUTINE
END INTERFACE
INTERFACE
SUBROUTINE dummy_atom_list_merge(this, other)
USE class_dummy_atom_types, ONLY: dummy_atom_list
TYPE(dummy_atom_list), INTENT(inout) :: this
TYPE(dummy_atom_list), INTENT(in) :: other
END SUBROUTINE
END INTERFACE
END MODULE
SUBROUTINE dummy_atom_list_init_copy(this, other)
USE class_dummy_atom_list, ONLY: dummy_atom_list, dummy_atom_list_merge
TYPE(dummy_atom_list), INTENT(out) :: this
TYPE(dummy_atom_list), INTENT(in) :: other
this%table(1:this%nused) = other%table(1:other%nused)
END SUBROUTINE
! { dg-final { cleanup-modules "class_dummy_atom_types class_dummy_atom_list" } }
|