repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c/29467
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
intrinsic_sign_1.f90
blob
03addde78c402c429c7635c72b2b4d4bffc12d44
1
! { dg-do run }
2
! At one point, SIGN() evaluated its first argument twice.
3
! Contributed by Brooks Moses <brooks.moses@codesourcery.com>
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