[to-be-committed] [RISC-V] Use Zbkb for general 64 bit constants when profitable
[official-gcc.git] / gcc / testsuite / gfortran.dg / defined_assignment_4.f90
blobf7e310de691cfaed32166c3cd1550a6b8ee01e13
1 ! { dg-do run }
2 ! Test the fix for PR46897. First patch did not run this case correctly.
3 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
5 module a_mod
6 type :: a
7 integer :: i = 99
8 contains
9 procedure :: a_ass
10 generic :: assignment(=) => a_ass
11 end type a
13 type c
14 type(a) :: ta
15 end type c
17 type :: b
18 type(c) :: tc
19 end type b
21 contains
22 elemental subroutine a_ass(out, in)
23 class(a), intent(INout) :: out
24 type(a), intent(in) :: in
25 out%i = 2*in%i
26 end subroutine a_ass
27 end module a_mod
29 program assign
30 use a_mod
31 type(b) :: tt
32 type(b) :: tb1
33 tt = tb1
34 if (tt%tc%ta%i .ne. 198) STOP 1
35 end program assign