aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/rank_4.f90
blob: a370df01c7da48672628031db35b9789a607167a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do compile }
! { dg-options "-std=f2008ts -fdump-tree-original" }
!
! PR fortran/48820
!

program test_rank
  implicit none
  intrinsic :: rank

  integer :: a
  real, allocatable :: b(:,:)

  if (rank(a) /= 0) call not_existing()
  if (rank (b) /= 2) call not_existing()
end program test_rank

! { dg-final { scan-tree-dump-times "not_existing" 0 "original" } }
! { dg-final { cleanup-tree-dump "original" } }