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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [arithmeticif.f90] - Blame information for rev 867

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! Program to test the arithmetic if statement
2
function testif (a)
3
   implicit none
4
   integer a, b, testif
5
 
6
   if (a) 1, 2, 3
7
   b = 2
8
   goto 4
9
 1 b = -1
10
   goto 4
11
 2 b = 0
12
   goto 4
13
 3 b = 1
14
 4 testif = b
15
end function
16
 
17
program testwrite
18
   implicit none
19
   integer i
20
   integer testif
21
 
22
   if (testif (-10) .ne. -1) call abort
23
   if (testif (0) .ne. 0) call abort
24
   if (testif (10) .ne. 1) call abort
25
end program

powered by: WebSVN 2.1.0

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