This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/17917] gfortran ICE on "equivalence"
- From: "paulthomas2 at wanadoo dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Aug 2005 07:54:22 -0000
- Subject: [Bug fortran/17917] gfortran ICE on "equivalence"
- References: <20041009232408.17917.olchansk@panix.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From paulthomas2 at wanadoo dot fr 2005-08-03 07:54 -------
(In reply to comment #11)
> Patch posted here: http://gcc.gnu.org/ml/fortran/2005-06/msg00307.html
This is still not complete. The example below produces separate unions, which
represent the equivalences, in sub1 and sub2. They need to be promoted to a
more elevated namespace AND declared external, so that loaded procedures also
pick up the same union. The COMMON code is mostly OK, so I will be applying
that to module equivalences. I'm on to it, as promised on the list.....
Paul T
module equiv
real :: x(10), y(2)
equivalence (y(1), x(5))
end module equiv
subroutine sub1 ()
use equiv
x =(/(real (i), i = 1,10)/)
end subroutine sub1
subroutine sub2 ()
use equiv
print *, y
end subroutine sub2
program test_equiv
call sub1 ()
call sub2 ()
end program test_equiv
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17917