[Bug fortran/83704] pr31243 revisited
tkoenig at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 8 06:11:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83704
--- Comment #16 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
I hadn't actually compiled this... but then this at least compiles.
Index: resolve.c
===================================================================
--- resolve.c (Revision 256284)
+++ resolve.c (Arbeitskopie)
@@ -10120,8 +10120,8 @@ resolve_ordinary_assign (gfc_code *code, gfc_names
bool rval = false;
gfc_expr *lhs;
gfc_expr *rhs;
- int llen = 0;
- int rlen = 0;
+ ptrdiff_t llen = 0;
+ ptrdiff_t rlen = 0;
int n;
gfc_ref *ref;
symbol_attribute attr;
@@ -10219,8 +10219,8 @@ resolve_ordinary_assign (gfc_code *code, gfc_names
if (rlen && llen && rlen > llen)
gfc_warning_now (OPT_Wcharacter_truncation,
"CHARACTER expression will be truncated "
- "in assignment (%d/%d) at %L",
- llen, rlen, &code->loc);
+ "in assignment (%ld/%ld) at %L",
+ (long int) llen, (long int) rlen, &code->loc);
}
/* Ensure that a vector index expression for the lvalue is evaluated
I don't have the RAM to test it on my system at the moment.
More information about the Gcc-bugs
mailing list