On aarch64 -milp32, and presumably on other such targets, ptr can be
in a different mode than ptr_mode in the testcase. Cope with it.
for gcc/ChangeLog
PR target/112804
* builtins.cc (try_store_by_multiple_pieces): Use ptr's mode
for the increment.
for gcc/testsuite/ChangeLog
PR target/112804
* gcc.target/aarch64/inline-mem-set-pr112804.c: New.
to = change_address (to, QImode, 0);
emit_move_insn (to, val);
if (update_needed)
- next_ptr = plus_constant (ptr_mode, ptr, blksize);
+ next_ptr = plus_constant (GET_MODE (ptr), ptr, blksize);
}
else
{
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-finline-stringops -mabi=ilp32 -ftrivial-auto-var-init=zero" } */
+
+short m(unsigned k) {
+ const unsigned short *n[65];
+ return 0;
+}