This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/45777] Missing temporary ?
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 25 Sep 2010 14:30:56 +0000
- Subject: [Bug fortran/45777] Missing temporary ?
- Auto-submitted: auto-generated
- References: <bug-45777-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45777
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-09-25 14:30:55 UTC ---
The issue seems to be how alias checking is implemented in trans-array.c:
gfc_could_be_alias (gfc_ss * lss, gfc_ss * rss)
[...]
for (rref = rss->expr->ref; rref != rss->data.info.ref; rref = rref->next)
{
if (gfc_symbols_could_alias (rref->u.c.sym, lsym))
return 1;
}
While "rss->expr->symtree->n.sym" (= "rsym") has the pointer and target
attribute, the element "rref->u.c.sym" usually has not.
Thus, the gfc_symbols_could_alias check succeeds (first argument is neither a
pointer nor a target thus it cannot alias with the second argument, unless both
symbol are the same); cf. symbol.c's
gfc_symbols_could_alias (gfc_symbol *lsym, gfc_symbol *rsym)
[...]
if (lsym->attr.pointer
&& (rsym->attr.pointer || rsym->attr.allocatable || rsym->attr.target))
return 1;
if (lsym->attr.target && rsym->attr.pointer)
return 1;
if (lsym->attr.allocatable && rsym->attr.pointer)
return 1;
[...]
return 0;
--
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.