1! { dg-do compile }
2! { dg-options "-std=legacy" }
3! PR fortran/67615
4!
5program foo
6
7   implicit none
8
9   integer i(2), j
10   real x
11   complex z
12
13   j = 2
14   if (j) 10, 20, 30
15
16   x = -1
17   if (x) 10, 20, 30
18
19   z = (1,2)
20   if (z) 10, 20, 30                   ! { dg-error "Arithmetic IF statement" }
21
22   i = [1, 2]
23   if (i) 10, 20, 30                   ! { dg-error "Arithmetic IF statement" }
24
25   if ( [1] ) 10, 20, 30               ! { dg-error "Arithmetic IF statement" }
26   if ( [1, -1] ) 10, 20, 30           ! { dg-error "Arithmetic IF statement" }
27   if ( [real :: 1, -1] ) 10, 20, 30   ! { dg-error "Arithmetic IF statement" }
28
2910 stop
3020 stop
3130 stop
32
33end program foo
34