RISC-V: Regenerate opt urls.
[official-gcc.git] / gcc / testsuite / gfortran.dg / defined_assignment_7.f90
blobb2e43535e6b600d416ee232197781a8688bd2e4a
1 ! { dg-do compile }
3 ! PR fortran/57508
5 module ForTrilinos_ref_counter
6 type ref_counter
7 contains
8 procedure :: assign
9 generic :: assignment(=) => assign
10 end type
11 contains
12 subroutine assign (lhs, rhs)
13 class (ref_counter), intent(inout) :: lhs
14 class (ref_counter), intent(in) :: rhs
15 end subroutine
16 end module
17 module FEpetra_BlockMap
18 use ForTrilinos_ref_counter, only : ref_counter
19 type :: Epetra_BlockMap
20 type(ref_counter) :: counter
21 end type
22 contains
23 function from_struct() result(new_Epetra_BlockMap)
24 type(Epetra_BlockMap) :: new_Epetra_BlockMap
25 end function
26 type(Epetra_BlockMap) function create_arbitrary()
27 create_arbitrary = from_struct()
28 end function
29 end module