aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr104330.f90
blob: 9ff48e2f6cc4ee64c57666cb0a09c4417e6d96c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! { dg-do compile }
! { dg-options "-fcoarray=lib" }
!
! PR fortran/104330 - ICE in gfc_simplify_image_index
! Contributed by G.Steinmetz

program p
  implicit none
  type t
  end type t
  class(*), allocatable :: x[:]
  class(t), allocatable :: y[:]
  type(t),  allocatable :: z[:]
  allocate (real :: x[*])
  print *, image_index(x, [1])
  allocate (t :: y[*])
  print *, image_index(y, [1])
  allocate (t :: z[*])
  print *, image_index(z, [1])
end