aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/argument_checking_26.f90
blob: 2b765c5f866af532f75af1a8c91645049812c8c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
! { dg-do compile }
! PR fortran/104212 - ICE in transformational_result
! Contributed by G.Steinmetz

program p
  logical, parameter :: a(*,*) = reshape([.true.,.false.], shape=[1,2])
  real,    parameter :: r(*,*) = reshape([1.,2.], shape=[1,2])
  print *, parity(a)
  print *, parity(a, dim=1)
  print *, parity(a, dim=[1]) ! { dg-error "must be a scalar" }
  print *, norm2 (r)
  print *, norm2 (r, dim=1)
  print *, norm2 (r, dim=[1]) ! { dg-error "must be a scalar" }
end