Commit 605e9b1a by Harald Anlauf

PR fortran/95091 - Buffer overflows with submodules and long symbols

Add cast to fix bootstrap error with -Werror=sign-compare.

gcc/fortran/
	PR fortran/95091
	* class.c (gfc_hash_value): Add cast.

(cherry picked from commit 5aaccde3db39fac7e7f6677ceccc1eadd9c6a424)
parent bf6199ec
......@@ -540,7 +540,7 @@ gfc_hash_value (gfc_symbol *sym)
get_unique_type_string (&c[0], sym);
len = strnlen (c, sizeof (c));
gcc_assert (len < sizeof (c));
gcc_assert ((size_t) len < sizeof (c));
for (i = 0; i < len; i++)
hash = (hash << 6) + (hash << 16) - hash + c[i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment