[Bug fortran/83704] pr31243 revisited

dominiq at lps dot ens.fr gcc-bugzilla@gcc.gnu.org
Sun Jan 7 13:26:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83704

--- Comment #13 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Which looks like a clear case of integer wraparound. Given that
> the testcase works, apparently correctly, I would guess the it's
> an error in the implementation of the -Wcharacter-truncation warning.

gfc_set_constant_character_len (int len, gfc_expr *expr, int check_len)
{
  gfc_char_t *s;
  int slen;
...

in fortran/decl.c looks wrong, but I failed to find a fix!-(


More information about the Gcc-bugs mailing list