PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / character_comparison_4.f90
blobd442b50a24993363b5f93bec7e63679a3a2996fe
1 ! { dg-do run }
2 ! { dg-options "-O -fdump-tree-original" }
3 program main
4 implicit none
5 character(len=4) :: c, d
6 integer :: n
7 integer :: i
8 common /foo/ i
10 n = 0
11 i = 0
12 c = 'abcd'
13 d = 'efgh'
15 n = n + 1 ; if ('a' // c == 'a' // c) call yes
16 n = n + 1 ; if (c // 'a' == c // 'a') call yes
17 n = n + 1; if ('b' // c > 'a' // d) call yes
18 n = n + 1; if (c // 'b' > c // 'a') call yes
20 if ('a' // c /= 'a' // c) STOP 1
21 if ('a' // c // 'b' == 'a' // c // 'a') STOP 2
22 if ('b' // c == 'a' // c) STOP 3
23 if (c // 'a' == c // 'b') STOP 4
24 if (c // 'a ' /= c // 'a') STOP 5
25 if (c // 'b' /= c // 'b ') STOP 6
27 if (n /= i) STOP 7
28 end program main
30 subroutine yes
31 implicit none
32 common /foo/ i
33 integer :: i
34 i = i + 1
35 end subroutine yes
37 ! { dg-final { scan-tree-dump-times "gfortran_compare_string" 0 "original" } }