rtlanal.c (rtx_varies_p): Return 0 for NULL_RTX

* rtlanal.c (rtx_varies_p): Return 0 for NULL_RTX
testsuite/
	* gcc.c-torture/compile/libcall-1.c: New test.

From-SVN: r78027
This commit is contained in:
Paul Brook 2004-02-18 12:33:18 +00:00 committed by Paul Brook
parent 5c1c8a03a6
commit e978d62ee6
4 changed files with 27 additions and 1 deletions

View File

@ -1,3 +1,7 @@
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

View File

@ -134,10 +134,14 @@ rtx_unstable_p (rtx x)
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:

View File

@ -1,3 +1,7 @@
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

View File

@ -0,0 +1,14 @@
/* 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];
}