re PR rtl-optimization/20331 (Wrong code generation for the argument of the pure function in PIC)

PR rtl-optimization/20331
	* rtlanal.c (modified_between_p): Check its address first for MEM.
	(modified_in_p): Likewise.

From-SVN: r96282
This commit is contained in:
Kaz Kojima 2005-03-11 03:14:44 +00:00
parent 8bad007cf7
commit 550b7784c6
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2005-03-11 Kaz Kojima <kkojima@gcc.gnu.org>
PR rtl-optimization/20331
* rtlanal.c (modified_between_p): Check its address first for MEM.
(modified_in_p): Likewise.
2005-03-11 Joseph S. Myers <joseph@codesourcery.com>
* config.gcc (hppa*64*-*-hpux11*): Use pa/t-hpux-shlib.

View File

@ -817,10 +817,10 @@ modified_between_p (rtx x, rtx start, rtx end)
return 1;
case MEM:
if (MEM_READONLY_P (x))
return 0;
if (modified_between_p (XEXP (x, 0), start, end))
return 1;
if (MEM_READONLY_P (x))
return 0;
for (insn = NEXT_INSN (start); insn != end; insn = NEXT_INSN (insn))
if (memory_modified_in_insn_p (x, insn))
return 1;
@ -875,10 +875,10 @@ modified_in_p (rtx x, rtx insn)
return 1;
case MEM:
if (MEM_READONLY_P (x))
return 0;
if (modified_in_p (XEXP (x, 0), insn))
return 1;
if (MEM_READONLY_P (x))
return 0;
if (memory_modified_in_insn_p (x, insn))
return 1;
return 0;