Debian Codegraph @

gcc/testsuite/gfortran.dg/spread_simplify_1.f90

raw
1 ! { dg-do run }
2 ! PR 68426 - simplification used to fail.
3 module m
4 implicit none
5 type t
6 integer :: i
7 end type t
8 type(t), dimension(2), parameter :: a1 = (/ t(1), t(2) /)
9 type(t), dimension(1), parameter :: c = spread ( a1(1), 1, 1 )
10 end module m
11
12
13 program main
14 use m
15 if (c(1)%i /= 1) stop 1
16 end program main