diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/rtl.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b07ac1b..792a400 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca> + + * rtl.c (rtx_equal_p): Check for null pointers when comparing rtx + strings. + 2001-12-07 Richard Henderson <rth@redhat.com> * doc/extend.texi: Fix typo last change. @@ -670,7 +670,9 @@ rtx_equal_p (x, y) case 'S': case 's': - if (strcmp (XSTR (x, i), XSTR (y, i))) + if ((XSTR (x, i) || XSTR (y, i)) + && (! XSTR (x, i) || ! XSTR (y, i) + || strcmp (XSTR (x, i), XSTR (y, i)))) return 0; break; |