+2012-02-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/52129
+ * calls.c (mem_overlaps_already_clobbered_arg_p): If val is
+ CONST_INT_P, subtract resp. add crtl->args.pretend_args_size to it.
+
2012-02-06 Jonathan Wakely <jwakely.gcc@gmail.com>
PR c++/48680
return true;
else
i = INTVAL (val);
+#ifdef STACK_GROWS_DOWNWARD
+ i -= crtl->args.pretend_args_size;
+#else
+ i += crtl->args.pretend_args_size;
+#endif
#ifdef ARGS_GROW_DOWNWARD
i = -i - size;
+2012-02-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/52129
+ * gcc.c-torture/execute/pr52129.c: New test.
+
2012-02-06 Andrey Belevantsev <abel@ispras.ru>
* gcc.dg/pr48374.c: Actually add the test I forgot
--- /dev/null
+/* PR target/52129 */
+
+extern void abort (void);
+struct S { void *p; unsigned int q; };
+struct T { char a[64]; char b[64]; } t;
+
+__attribute__((noinline, noclone)) int
+foo (void *x, struct S s, void *y, void *z)
+{
+ if (x != &t.a[2] || s.p != &t.b[5] || s.q != 27 || y != &t.a[17] || z != &t.b[17])
+ abort ();
+ return 29;
+}
+
+__attribute__((noinline, noclone)) int
+bar (void *x, void *y, void *z, struct S s, int t, struct T *u)
+{
+ return foo (x, s, &u->a[t], &u->b[t]);
+}
+
+int
+main ()
+{
+ struct S s = { &t.b[5], 27 };
+ if (bar (&t.a[2], (void *) 0, (void *) 0, s, 17, &t) != 29)
+ abort ();
+ return 0;
+}