http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59399

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
On both x86_64 and ppc64, we have this identical SSA_NAME:

<ssa_name 0x7fb5a659ccf0
    type <integer_type 0x7fb5a65a4690 int sizes-gimplified public SI
        size <integer_cst 0x7fb5a65a6440 constant 32>
        unit size <integer_cst 0x7fb5a65a6460 constant 4>
        align 32 symtab 0 alias set -1 canonical type 0x7fb5a65a4690 precision
32 min <integer_cst 0x7fb5a65a63e0 -2147483648> max <integer_cst 0x7fb5a65a6400
2147483647>
        pointer_to_this <pointer_type 0x7fb5a65b7738>>
    visited var <var_decl 0x7fb5a6722428 D.2423>def_stmt _3 = UBSAN_CHECK_ADD
(j_1(D), i_2(D));

    version 3>

Now in expr.c we call get_rtx_for_ssa_name on it.  On x86_64 the RTX is then
(reg:SI 83 [ D.2423 ]) while on ppc64 the RTX is (reg:DI 123 [ D.2759+-4 ]), so
we have a discrepancy here.  And then the following is true on ppc64
      if (REG_P (decl_rtl)
          && DECL_MODE (exp) != BLKmode
          && GET_MODE (decl_rtl) != DECL_MODE (exp))
because DECL_MODE (exp) is SImode, not DImode.  And then we make our way to the
block of code where we fail.

Why get_rtx_for_ssa_name returns different rtx for the same SSA_NAME?

Reply via email to