[Bug fortran/26440] ICE in expand_copysign, at optabs.c:2930 with using -ff2c
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Feb 24 12:25:00 GMT 2006
------- 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
More information about the Gcc-bugs
mailing list