This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38913] Fortran does not set TYPE_CANONICAL properly
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jun 2009 20:43:51 -0000
- Subject: [Bug fortran/38913] Fortran does not set TYPE_CANONICAL properly
- References: <bug-38913-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #14 from rguenth at gcc dot gnu dot org 2009-06-28 20:43 -------
Another one, reduced from function_module_1.f90:
module M1
INTEGER p
CONTAINS
subroutine AA ()
implicit NONE
p = 1
end subroutine
end module
program P1
USE M1
implicit none
p = 0
call AA ()
if (p /= 1) call abort
end
where the issue is that p is not properly unified in the use in P1 and AA.
After inlining we see:
p1 ()
{
integer(kind=4)D.3 p.0D.1516;
<bb 2>:
pD.1514 = 0;
pD.1509 = 1;
p.0D.1516_1 = pD.1514;
if (p.0D.1516_1 != 1)
so we store to / read from different variables.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38913