Consider the following subroutine in Fortran 77: subroutine shift(a, b, c) integer a, b, c a =

Question:

Consider the following subroutine in Fortran 77:

subroutine shift(a, b, c)

integer a, b, c

a = b

b = c

end

Suppose we want to call shift(x, y, 0) but we don’t want to change the value of y. Knowing that built-up expressions are passed as temporaries, we decide to call shift(x, y+0, 0). Our code works fine at first, but then (with some compilers) fails when we enable optimization. What is going on? What might we do instead?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: