diff options
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cse.c b/gcc/cse.c index 944d86f3be8..8c2e9fc580a 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -2252,7 +2252,9 @@ canon_hash (x, mode) hash += canon_hash (XVECEXP (x, i, j), 0); else if (fmt[i] == 's') { - register unsigned char *p = (unsigned char *) XSTR (x, i); + register const unsigned char *p = + (const unsigned char *) XSTR (x, i); + if (p) while (*p) hash += *p++; |