Debian Codegraph @

gcc/testsuite/gfortran.dg/argument_checking_26.f90

raw
1 ! { dg-do compile }
2 ! PR fortran/104212 - ICE in transformational_result
3 ! Contributed by G.Steinmetz
4
5 program p
6 logical, parameter :: a(*,*) = reshape([.true.,.false.], shape=[1,2])
7 real, parameter :: r(*,*) = reshape([1.,2.], shape=[1,2])
8 print *, parity(a)
9 print *, parity(a, dim=1)
10 print *, parity(a, dim=[1]) ! { dg-error "must be a scalar" }
11 print *, norm2 (r)
12 print *, norm2 (r, dim=1)
13 print *, norm2 (r, dim=[1]) ! { dg-error "must be a scalar" }
14 end