builtin_eh_return requires the return address to be saved on the
stack. The patch prevents using an FPR for that.
gcc/ChangeLog:
2017-04-05 Dominik Vogt <vogt@linux.vnet.ibm.com>
PR target/79890
* config/s390/s390.c (s390_register_info_gprtofpr): Return if
call_eh_return is true.
gcc/testsuite/ChangeLog:
2017-04-05 Dominik Vogt <vogt@linux.vnet.ibm.com>
PR target/79890
* gcc.target/s390/pr79890.c: New test case.
From-SVN: r246701
+2017-04-05 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ PR target/79890
+ * config/s390/s390.c (s390_register_info_gprtofpr): Return if
+ call_eh_return is true.
+
2017-04-05 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390-c.c (s390_resolve_overloaded_builtin):
if (!TARGET_Z10 || !TARGET_HARD_FLOAT || !crtl->is_leaf)
return;
+ /* builtin_eh_return needs to be able to modify the return address
+ on the stack. It could also adjust the FPR save slot instead but
+ is it worth the trouble?! */
+ if (crtl->calls_eh_return)
+ return;
+
for (i = 15; i >= 6; i--)
{
if (cfun_gpr_save_slot (i) == SAVE_SLOT_NONE)
+2017-04-05 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ PR target/79890
+ * gcc.target/s390/pr79890.c: New test case.
+
2017-04-05 Jakub Jelinek <jakub@redhat.com>
PR target/80310
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-Wno-pedantic" } */
+
+void bar (void);
+
+void
+foo (int x)
+{
+ __builtin_unwind_init ();
+ __builtin_eh_return (x, bar);
+}