program fc106 ! Submitted by Walt Brainerd, The Fortran Company ! GNU Fortran 95 (GCC 4.1.0 20050322 (experimental)) ! Windows XP
! Output is ! 1 2 3 ! 1 1 1 ! 1 1 1 ! Output should be ! 1 2 3 ! 1 1 2 ! 1 2 3 real, dimension (3) :: a, b equivalence (a(2), b) a = (/ (i, i=1,3) /) print *, a b = a; print *, a print *, b end program fc106 I think this means that we don't see that in the assignment b = a the RHS and the LHS are dependent, and therefore don't copy via a temporary, but I haven't checked. -- Summary: Dependency checking fails for equivalences Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tobi at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20938