From be0063829a45521d1301ea74a087ee287d18c441 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Sat, 8 Dec 2001 06:11:25 +0000 Subject: [PATCH] rtl.c (rtx_equal_p): Check for null pointers when comparing rtx strings. * rtl.c (rtx_equal_p): Check for null pointers when comparing rtx strings. From-SVN: r47785 --- gcc/ChangeLog | 5 +++++ gcc/rtl.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b07ac1b438f..792a4008084 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-12-08 John David Anglin + + * rtl.c (rtx_equal_p): Check for null pointers when comparing rtx + strings. + 2001-12-07 Richard Henderson * doc/extend.texi: Fix typo last change. diff --git a/gcc/rtl.c b/gcc/rtl.c index 3e73e4bf835..4d97bbd14ab 100644 --- a/gcc/rtl.c +++ b/gcc/rtl.c @@ -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; -- 2.30.2