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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [integer_select.f90] - Blame information for rev 695

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 695 jeremybenn
PROGRAM Test_INTEGER_select
2
 
3
! Every wrong branch leads to destruction.
4
 
5
  INTEGER, PARAMETER :: maxI = HUGE (maxI)
6
  INTEGER, PARAMETER :: minI = -1 * maxI
7
  INTEGER :: I = 0
8
 
9
  SELECT CASE (I)
10
     CASE (:-1)
11
        CALL abort
12
     CASE (1:)
13
        CALL abort
14
     CASE DEFAULT
15
        CONTINUE
16
  END SELECT
17
 
18
  SELECT CASE (I)
19
     CASE (3,2,1)
20
        CALL abort
21
     CASE (0)
22
        CONTINUE
23
     CASE DEFAULT
24
        call abort
25
  END SELECT
26
 
27
! Not aborted by here, so it worked
28
! See about weird corner cases
29
 
30
  I = maxI
31
 
32
  SELECT CASE (I)
33
     CASE (:-1)
34
        CALL abort
35
     CASE (1:)
36
        CONTINUE
37
     CASE DEFAULT
38
        CALL abort
39
  END SELECT
40
 
41
  SELECT CASE (I)
42
     CASE (3,2,1,:0)
43
        CALL abort
44
     CASE (maxI)
45
        CONTINUE
46
     CASE DEFAULT
47
        call abort
48
  END SELECT
49
 
50
  I = minI
51
 
52
  SELECT CASE (I)
53
     CASE (:-1)
54
        CONTINUE
55
     CASE (1:)
56
        CALL abort
57
     CASE DEFAULT
58
        CALL abort
59
  END SELECT
60
 
61
  SELECT CASE (I)
62
     CASE (3:,2,1,0)
63
        CALL abort
64
     CASE (minI)
65
        CONTINUE
66
     CASE DEFAULT
67
        call abort
68
  END SELECT
69
 
70
END
71
 

powered by: WebSVN 2.1.0

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