modula2: Simplify REAL/LONGREAL/SHORTREAL node creation.
[official-gcc.git] / gcc / testsuite / gfortran.dg / maxloc_shape_1.f90
blob0004f67f969b96a23c3505f57abc0cb3d3dfc21b
1 ! { dg-do compile }
2 ! Tests the implementation of compile-time shape testing, required to fix
3 ! PR19015. The functionality of maxloc and friends is tested by existing
4 ! testcases.
6 ! Contributed by Thomas Koeing <Thomas.Koenig@online.de>
8 integer, dimension(0:1,0:1) :: n
9 integer, dimension(1) :: i
10 n = reshape((/1, 2, 3, 4/), shape(n))
11 i = maxloc(n) ! { dg-error "Different shape for array assignment" }
12 i = maxloc(n,dim=1) ! { dg-error "Different shape for array assignment" }
13 ! print *,i
14 end program