This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/26440] ICE in expand_copysign, at optabs.c:2930 with using -ff2c
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Feb 2006 11:28:12 -0000
- Subject: [Bug fortran/26440] ICE in expand_copysign, at optabs.c:2930 with using -ff2c
- References: <bug-26440-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from rguenth at gcc dot gnu dot org 2006-02-24 11:28 -------
gfc_sym_type()
if (gfc_option.flag_f2c
&& sym->attr.function
&& sym->ts.type == BT_REAL
&& sym->ts.kind == gfc_default_real_kind
&& !sym->attr.always_explicit)
{
/* Special case: f2c calling conventions require that (scalar)
default REAL functions return the C type double instead. */
sym->ts.kind = gfc_default_double_kind;
type = gfc_typenode_for_spec (&sym->ts);
sym->ts.kind = gfc_default_real_kind;
}
is asking for trouble. This kind of hack has to be repeated elsewhere, so
we do not miss the type-mismatch between FOO and X.
But the real solution looks like creating the correct kind for the return
type in the first place like if it was written as REAL*8.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26440