OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [character_comparison_4.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { 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
9
 
10
  n = 0
11
  i = 0
12
  c = 'abcd'
13
  d = 'efgh'
14
 
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
19
 
20
  if ('a' // c /= 'a' // c) call abort
21
  if ('a' // c // 'b' == 'a' // c // 'a') call abort
22
  if ('b' // c == 'a' // c) call abort
23
  if (c // 'a' ==  c // 'b') call abort
24
  if (c // 'a ' /=  c // 'a') call abort
25
  if (c // 'b' /=  c // 'b ') call abort
26
 
27
  if (n /= i) call abort
28
end program main
29
 
30
subroutine yes
31
  implicit none
32
  common /foo/ i
33
  integer :: i
34
  i = i + 1
35
end subroutine yes
36
 
37
! { dg-final { scan-tree-dump-times "gfortran_compare_string" 0 "original" } }
38
! { dg-final { cleanup-tree-dump "original" } }
39
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.