This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/18518] equivalenced variables are not saved


------- Additional Comments From Thomas dot Koenig at online dot de  2004-11-18 18:53 -------
It appears that equivalenced variables are not
saved.

Here's a simplified test case:

$ cat pr18518-test.f90
program main
  call foo
  call bar
  call foo
end program main

subroutine foo
  integer i,g,h
  data i/0/
  equivalence (g,h)
  save g
  if (i == 0) then
     i = 1
     h = 12345
  end if
  print *,h
end subroutine foo

subroutine bar
  integer a(10)
  a = 34
end subroutine bar
$ gfortran pr18518-test.f90 && ./a.out
       12345
          34

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|d1mach(4)  (BLAS) broken,   |equivalenced variables are
                   |g77 regression              |not saved


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18518


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]