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

Subversion Repositories openrisc

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

Go to most recent revision | 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
 
4
  if (foo ('E') .ne. 1) call abort
5
  if (foo ('e') .ne. 1) call abort
6
  if (foo ('f') .ne. 2) call abort
7
  if (foo ('g') .ne. 2) call abort
8
  if (foo ('h') .ne. 2) call abort
9
  if (foo ('Q') .ne. 3) call abort
10
  if (foo (' ') .ne. 4) call abort
11
  if (bar ('e') .ne. 1) call abort
12
  if (bar ('f') .ne. 3) call abort
13
contains
14
  function foo (c)
15
    character :: c
16
    integer :: foo
17
    select case (c)
18
      case ('E','e')
19
        foo = 1
20
      case ('f':'h  ')
21
        foo = 2
22
      case default
23
        foo = 3
24
      case ('')
25
        foo = 4
26
    end select
27
  end function
28
  function bar (c)
29
    character :: c
30
    integer :: bar
31
    select case (c)
32
      case ('ea':'ez')
33
        bar = 2
34
      case ('e')
35
        bar = 1
36
      case default
37
        bar = 3
38
      case ('fd')
39
        bar = 4
40
    end select
41
  end function
42
end
43
 
44
! { dg-final { scan-tree-dump-not "_gfortran_select_string" "original" } }
45
! { dg-final { cleanup-tree-dump "original" } }

powered by: WebSVN 2.1.0

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