1! { dg-do run } 2! { dg-options "-O -fdump-tree-original" } 3program main 4 implicit none 5 character(len=4) :: c 6 integer :: n 7 integer :: i 8 common /foo/ i 9 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) call abort 20 if (c > c) call abort 21 if (c < c) call abort 22 if (c .ne. c) call abort 23 if (c .gt. c) call abort 24 if (c .lt. c) call abort 25 if (n /= i) call abort 26end program main 27 28subroutine yes 29 implicit none 30 common /foo/ i 31 integer :: i 32 i = i + 1 33end subroutine yes 34 35! { dg-final { scan-tree-dump-times "gfortran_compare_string" 0 "original" } } 36 37