This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/66377] New: [F95] Wrong-code with equivalenced array in module
- From: "fxcoudert at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 02 Jun 2015 10:21:28 +0000
- Subject: [Bug fortran/66377] New: [F95] Wrong-code with equivalenced array in module
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66377
Bug ID: 66377
Summary: [F95] Wrong-code with equivalenced array in module
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: fxcoudert at gcc dot gnu.org
Target Milestone: ---
This code:
module constant
integer :: x(2), x1, x2
equivalence (x(1),x1), (x(2),x2)
end module
program test
use constant
x = (/1, 2/)
call another()
contains
subroutine another()
use constant, only : x1
print *, x1
end subroutine
end program
should output "1", but outputs "0" with all versions of gfortran tested.