+2016-06-22 Eric Botcazou <ebotcazou@adacore.com>
+
+ * function.c (assign_parm_setup_reg): Prevent sharing in another case.
+
2016-06-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
* config/i386/i386.c (print_reg): Emit an error message on attempt to
set_mem_attributes (parmreg, parm, 1);
}
+ /* We need to preserve an address based on VIRTUAL_STACK_VARS_REGNUM for
+ the debug info in case it is not legitimate. */
if (GET_MODE (parmreg) != GET_MODE (rtl))
{
rtx tempreg = gen_reg_rtx (GET_MODE (rtl));
all->last_conversion_insn);
emit_move_insn (tempreg, rtl);
tempreg = convert_to_mode (GET_MODE (parmreg), tempreg, unsigned_p);
- emit_move_insn (parmreg, tempreg);
+ emit_move_insn (MEM_P (parmreg) ? copy_rtx (parmreg) : parmreg,
+ tempreg);
all->first_conversion_insn = get_insns ();
all->last_conversion_insn = get_last_insn ();
end_sequence ();
did_conversion = true;
}
else
- emit_move_insn (parmreg, rtl);
+ emit_move_insn (MEM_P (parmreg) ? copy_rtx (parmreg) : parmreg, rtl);
rtl = parmreg;
+2016-06-22 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/guality/param-5.c: New test.
+
2016-06-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
* gcc.target/i386/asm-flag-7.c: New test.
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-g" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
+
+typedef __UINTPTR_TYPE__ uintptr_t;
+
+typedef struct { uintptr_t pa; uintptr_t pb; } fatp_t
+ __attribute__ ((aligned (2 * __alignof__ (uintptr_t))));
+
+__attribute__((noinline, noclone)) void
+clear_stack (void)
+{
+ char a[128 * 1024 + 128];
+
+ __builtin_memset (a, 0, sizeof (a));
+}
+
+__attribute__((noinline, noclone)) void
+foo (fatp_t str, int count)
+{
+ char a[128 * 1024];
+
+ if (count > 0)
+ foo (str, count - 1);
+ clear_stack ();
+ count--; /* BREAK */
+}
+
+int
+main (void)
+{
+ fatp_t ptr = { 31415927, 27182818 };
+ foo (ptr, 1);
+ return 0;
+}
+
+/* { dg-final { gdb-test 26 "str.pa" "31415927" } } */
+/* { dg-final { gdb-test 26 "str.pb" "27182818" } } */