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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [intrinsic_sign_1.f90] - Blame information for rev 868

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

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do run }
2
! At one point, SIGN() evaluated its first argument twice.
3
! Contributed by Brooks Moses 
4
program sign1
5
  integer :: i
6
  i = 1
7
  if (sign(foo(i), 1) /= 1) call abort
8
  i = 1
9
  if (sign(foo(i), -1) /= -1) call abort
10
contains
11
  integer function foo(i)
12
    integer :: i
13
    foo = i
14
    i = i + 1
15
  end function
16
end

powered by: WebSVN 2.1.0

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