https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109788
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|tree-optimization |fortran
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Ah, perhaps it is a Fortran FE bug, but still IPA should try to be careful.
The _gfortran_spread_char_scalar fndecl the FE creates has types
array01_character(kind=1)&, integer(kind=8), real(kind=4)&, integer(kind=8)&,
integer(kind=4)& (just 5 arguments), but the call passes it 6 arguments, which
is why param_type for the last one is VOID_TYPE (aka the argument type list
terminator).
Strangely, the libgfortran function it is actually calling has
void
spread_char_scalar (gfc_array_char *ret,
GFC_INTEGER_4 ret_length __attribute__((unused)),
const char *source, const index_type *along,
const index_type *pncopies,
GFC_INTEGER_4 source_length __attribute__((unused)))
prototype. So, not really sure how can this work at all.