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...



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?

Nov 16, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here