@@ -2121,6 +2121,10 @@ avr_pass_fuse_add::Mem_Insn::Mem_Insn (rtx_insn *insn)
else
return;
+ if (avr_mem_memx_p (mem)
+ || avr_load_libgcc_p (mem))
+ return;
+
addr = XEXP (mem, 0);
addr_code = GET_CODE (addr);
new file mode 100644
@@ -0,0 +1,22 @@
+/* { dg-do link } */
+/* { dg-additional-options "-std=gnu99" } */
+
+#ifdef __FLASH
+
+long val;
+
+__attribute__((used))
+const __flash long*
+load4_flash (const __flash long *p)
+{
+ val += *p++;
+ val += *p++;
+ return p;
+}
+
+#endif
+
+int main (void)
+{
+ return 0;
+}