[to-be-committed] [RISC-V] Use Zbkb for general 64 bit constants when profitable
[official-gcc.git] / gcc / testsuite / gfortran.dg / array_simplify_4.f90
blob2aa522be44dab63c9e85c97d9524b93c64e0199c
1 ! { dg-do compile }
3 ! PR fortran/92996
5 ! Contributed by G. Steinmetz
8 module m
9 integer, parameter :: d(2) = [0,0]
10 end module m
12 subroutine one
13 use m
14 print size([1,2],dim=d(1)) ! { dg-error "'dim' argument of 'size' intrinsic at .1. is not a valid dimension index" }
15 end
17 subroutine two
18 complex, parameter :: x = 1
20 stop x ! { dg-error "STOP code at .1. must be either INTEGER or CHARACTER type" }
21 end
23 program p
24 integer, parameter :: a(2) = [1, 2]
25 stop a(1) ! OK
26 stop a ! { dg-error "STOP code at .1. must be scalar" }
27 stop a(1,1) ! { dg-error "Rank mismatch in array reference at .1. .2/1." }
28 end