Debian Codegraph @

gcc/testsuite/gfortran.dg/pr104330.f90

raw
1 ! { dg-do compile }
2 ! { dg-options "-fcoarray=lib" }
3 !
4 ! PR fortran/104330 - ICE in gfc_simplify_image_index
5 ! Contributed by G.Steinmetz
6
7 program p
8 implicit none
9 type t
10 end type t
11 class(*), allocatable :: x[:]
12 class(t), allocatable :: y[:]
13 type(t), allocatable :: z[:]
14 allocate (real :: x[*])
15 print *, image_index(x, [1])
16 allocate (t :: y[*])
17 print *, image_index(y, [1])
18 allocate (t :: z[*])
19 print *, image_index(z, [1])
20 end