* rtlanal.c (rtx_varies_p): Return 0 for NULL_RTX
testsuite/
* gcc.c-torture/compile/libcall-1.c: New test.
From-SVN: r78027
+2004-02-18 Paul Brook <paul@codesourcery.com>
+
+ * rtlanal.c (rtx_varies_p): Return 0 for NULL_RTX
+
2004-02-18 Paul Brook <paul@codesourcery.com>
PR debug/12934
int
rtx_varies_p (rtx x, int for_alias)
{
- RTX_CODE code = GET_CODE (x);
+ RTX_CODE code;
int i;
const char *fmt;
+ if (!x)
+ return 0;
+
+ code = GET_CODE (x);
switch (code)
{
case MEM:
+2004-02-18 Paul Brook <paul@codesourcery.com>
+
+ * gcc.c-torture/compile/libcall-1.c: New test.
+
2004-02-18 Paul Brook <paul@codesourcery.com>
PR debug/12934
--- /dev/null
+/* Failed on ARM because rtx_varies_p didn't like the REG_EQUAL notes
+ generated for libcalls.
+ http://gcc.gnu.org/ml/gcc-patches/2004-02/msg01518.html */
+static const char digs[] = "0123456789ABCDEF";
+int __attribute__((pure)) bar();
+
+int foo (int i)
+{
+ int len;
+ if (i)
+ return 0;
+ len = bar();
+ return digs[len];
+}