Debian Codegraph @

gcc/testsuite/gfortran.dg/pr67615.f90

raw
1 ! { dg-do compile }
2 ! { dg-options "-std=legacy" }
3 ! PR fortran/67615
4 !
5 program 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
29 10 stop
30 20 stop
31 30 stop
32
33 end program foo