summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/assumed_rank_18.f90
blob: 0bc419ac6d7e601400db3e8c8ee5fb5625ee4ed8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do run }
! PR 91643 - this used to cause an ICE.
! Original test case by Gerhard Steinmetz.
program p
   real :: z(3) = [1.0, 2.0, 3.0]
   call g(z)
contains
   subroutine g(x)
      real :: x(..)
      select rank (x)
        rank (1)
          call h(x)
      end select
   end
   subroutine h(x)
      real :: x(*)
      if (x(1) /= 1.0) stop 1
   end
end