Bug in find_reloads_address

D. Towner towner@compsci.bristol.ac.uk
Fri Feb 15 06:58:00 GMT 2002


Hi all,

Suppose I have the following code:

  set (reg A) (symbol_ref)
  set (reg B) (mem (plus (reg A) (const_int)))

The function find_reloads_address converts this to:

  set (reg B) (mem (plus (symbol_ref) (const_int)))

That is, the symbol ref is propagated into the second instruction. Now the
second instruction is invalid for my machine, so legitimate_address
correctly rejects it - a fact which is tested by strict_memory_address_p
in find_reloads_address. However, rather than reverting back to the
previous correct instruction sequence, or replacing the now-incorrect
instruction with a correct instruction, find_reloads_address continues to
use the incorrect instruction. Is this a bug, or something I am doing
wrong?

Thanks,

  Daniel.

===============================================================================
Daniel Towner                        |
                                     |
Computer Science Department          | Email: D.W.Towner@bristol.ac.uk
University of Bristol                | Web:   http://www.cs.bris.ac.uk/~towner
Merchant Venturers Building          | Phone: 44 (0)117 954 5256
Woodland Road, Bristol, UK           |
BS8 1UB                              |
===============================================================================



More information about the Gcc mailing list