PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gfortran.dg / realloc_on_assign_16.f90
blob6b326b8f9c375b92e34de420a640619b5a5be107
1 ! { dg-do run }
2 ! Test the fix for PR56008
4 ! Contributed by Stefan Mauerberger <stefan.mauerberger@gmail.com>
6 PROGRAM main
7 !USE MPI
9 TYPE :: test_typ
10 REAL, ALLOCATABLE :: a(:)
11 END TYPE
13 TYPE(test_typ) :: xx, yy
14 TYPE(test_typ), ALLOCATABLE :: conc(:)
16 !CALL MPI_INIT(i)
18 xx = test_typ( [1.0,2.0] )
19 yy = test_typ( [4.0,4.9] )
21 conc = [ xx, yy ]
23 if (any (int (10.0*conc(1)%a) .ne. [10,20])) STOP 1
24 if (any (int (10.0*conc(2)%a) .ne. [40,49])) STOP 2
26 !CALL MPI_FINALIZE(i)
28 END PROGRAM main