Red Hat Bugzilla – Bug 168252
gfortran does not SAVE EQUIVALENCE variables
Last modified: 2007-11-30 17:11:13 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050720 Fedora/1.0.6-1.1.fc4 Firefox/1.0.6
Description of problem:
This is a report to Fedora Core 4 of the bug which is also at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18518. The basic problem is that in code like the following:
integer g, h
the value of h is not SAVE'd.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create the following routine foo.f90:
if (i == 0) then
i = 1
h = 12345
end subroutine foo
2. Compile with "gfortran -S foo.f90"
3. Look at assembly output f90.s.
Actual Results: The value 12345 is being put into a stack location.
Expected Results: The value 12345 should be put into the same memory location occupied by the variable g.
Fixed in GCC HEAD:
and approved for 4.0.x when it reopens.