This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Here, try this:
! { dg-do run } ! At one point, SIGN() evaluated its first argument twice. program sign1 integer :: i = 1 if (sign(foo(i), 1) /= 1) call abort
if (sign(foo(i), -1) /= -1) call abort
contains
integer function foo(i)
integer :: i
foo = i
i = i + 1
end function
end
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |