PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / character_comparison_1.f90
blob71adefa58ed08690c0a09b8d23466337a079e2c3
1 ! { dg-do run }
2 ! { dg-options "-O -fdump-tree-original" }
3 program main
4 implicit none
5 character(len=4) :: c
6 integer :: n
7 integer :: i
8 common /foo/ i
10 n = 0
11 i = 0
12 c = 'abcd'
13 n = n + 1 ; if (c == c) call yes
14 n = n + 1 ; if (c >= c) call yes
15 n = n + 1 ; if (c <= c) call yes
16 n = n + 1 ; if (c .eq. c) call yes
17 n = n + 1 ; if (c .ge. c) call yes
18 n = n + 1 ; if (c .le. c) call yes
19 if (c /= c) STOP 1
20 if (c > c) STOP 2
21 if (c < c) STOP 3
22 if (c .ne. c) STOP 4
23 if (c .gt. c) STOP 5
24 if (c .lt. c) STOP 6
25 if (n /= i) STOP 7
26 end program main
28 subroutine yes
29 implicit none
30 common /foo/ i
31 integer :: i
32 i = i + 1
33 end subroutine yes
35 ! { dg-final { scan-tree-dump-times "gfortran_compare_string" 0 "original" } }