aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr91565.f90
blob: e4e121c717acf5a4cabd1c8fdda45ed2b8091069 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! { dg-do compile }
! PR fortran/91565
! Contributed by Gerhard Steinmetz
program p
   integer, parameter :: a(2) = [2,2]
   print *, reshape([1,2,3,4,5,6], [2,3], order=a) ! { dg-error "ORDER at .1. is not a permutation of the size of SHAPE at .2." }
end

subroutine foo
   integer, parameter :: a(1) = 1
   print *, reshape([1,2,3,4,5,6], [2,3], order=a) ! { dg-error "are different" }
end

subroutine bar
   integer, parameter :: a(1,2) = 1
   print *, reshape([1,2,3,4,5,6], [2,3], order=a) ! { dg-error "are different" }
end