https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62254

--- Comment #17 from Julien Margetts <jmargetts at ocz dot com> ---
The following test case still fails with the patch applied (originally bug
70362)

arm-none-eabi-gcc -march=armv3m -c -o c_compat_x_tst.o
gcc/testsuite/gcc.dg/compat/scalar-by-value-4_x.c

The assert in the added by the patch is firing:

        /* The slot is out of range, or was dressed up in a SUBREG.  */
        base = reg_equiv_address (REGNO (ref));
+
+      /* PR 62554: If there is no equivalent memory location then just move
+        the value as an SImode register move.  This happens when the target
+        architecure variant does not have an HImode register move.  */
+      if (base == NULL)
+       {
+         gcc_assert (REG_P (operands[0])); <<<< FAIL >>>>
+         emit_insn (gen_movsi (gen_rtx_SUBREG (SImode, operands[0], 0),
+                               gen_rtx_SUBREG (SImode, ref, 0)));
+         return;
+       }
     }

At this point I believe operands[0] is a QImode SUBREG

Reply via email to