This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/28908] [4.1/4.2 Regression]: fold_convert fails for Fortran operator
- From: "hjl at lucon dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2006 18:28:28 -0000
- Subject: [Bug fortran/28908] [4.1/4.2 Regression]: fold_convert fails for Fortran operator
- References: <bug-28908-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #17 from hjl at lucon dot org 2006-08-31 18:28 -------
The previous gfc_get_derived_type tries to reuse the same TREE_TYPE:
/* In a module, if an equal derived type is already available in the
specification block, use its backend declaration and those of its
components, rather than building anew so that potential dummy and
actual arguments use the same TREE_TYPE. Non-module structures,
need to be built, if found, because the order of visits to the
namespaces is different. */
for (ns = derived->ns->parent; ns; ns = ns->parent)
{
for (dt = ns->derived_types; dt; dt = dt->next)
{
if (derived->module == NULL
&& dt->derived->backend_decl == NULL
&& gfc_compare_derived_types (dt->derived, derived))
gfc_get_derived_type (dt->derived);
if (copy_dt_decls_ifequal (dt->derived, derived))
break;
}
if (derived->backend_decl)
goto other_equal_dts;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28908