This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/50408] [4.6/4.7 regression] ICE in transfer_expr
- 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: Thu, 24 Nov 2011 22:13:06 +0000
- Subject: [Bug fortran/50408] [4.6/4.7 regression] ICE in transfer_expr
- Auto-submitted: auto-generated
- References: <bug-50408-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50408
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-11-24 22:13:06 UTC ---
That a -fwhole-file regression, which became the default in 4.6. The work
around is -fno-whole-file.
The problem is in gfc_get_extern_function_decl:
gfc_find_symbol (sym->name, gsym->ns, 0, &s);
if (s && s->backend_decl)
{
sym->backend_decl = s->backend_decl;
return sym->backend_decl;
}
The problem is that this does not set
sym->ts.u.derived{,->components{,->next}}->backend_decl
for BT_DERIVED/BT_CLASS; one might also need to update
sym->ts.u.cl...
for BT_CHARACTER.
Note: There are more places in trans*.c which call gfc_find_gsymbol