Patch to fix gcc.c-torture/compile/20010102-1.c on IA64 HP-UX

David Edelsohn dje.gcc@gmail.com
Thu Nov 6 20:43:00 GMT 2008


Jeff,

The RTL is a pair of (high (symbol_ref)) and (lo_sum (reg) (symbol_ref)).

alias.c:find_base_value() has a special case for lo_sum:

    case LO_SUM:
      /* The standard form is (lo_sum reg sym) so look only at the
         second operand.  */
      return find_base_value (XEXP (src, 1));

However, find_base_term() throws lo_sum in with PLUS and MINUS,
which prefers the REG.  find_base_term() appears to expect that the
symbol_ref from the HIGH will be recorded with the REG and picked
up by the LO_SUM from that source.

find_base_term() either could check for non-zero base before returning
in the lo_sum/plus/minus case statement or could handle lo_sum
explicitly, like find_base_value().

David



More information about the Gcc-patches mailing list