@@ -12709,6 +12709,13 @@ ldm_stm_operation_p (rtx op, bool load, machine_mode mode,
addr_reg_in_reglist = true;
}
+ /* The ascending register number requirement only makes sense when dealing
+ with hard registers. The code above already validated the ascending
+ requirement so we only need to validate the "hardness" of the last
+ register in the list. */
+ if (regno >= FIRST_PSEUDO_REGISTER)
+ return false;
+
if (load)
{
if (update && addr_reg_in_reglist)
new file mode 100644
@@ -0,0 +1,35 @@
+/* PR target/71436. */
+
+#pragma pack(1)
+struct S0
+{
+ volatile int f0;
+ short f2;
+};
+
+void foo (struct S0 *);
+int a, d;
+static struct S0 b[5];
+static struct S0 c;
+void fn1 ();
+void
+main ()
+{
+ {
+ struct S0 e;
+ for (; d; fn1 ())
+ {
+ {
+ a = 3;
+ for (; a >= 0; a -= 1)
+ {
+ {
+ e = c;
+ }
+ b[a] = e;
+ }
+ }
+ }
+ }
+ foo (b);
+}