public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* PR84300, ICE in dwarf2cfi on ppc64le
@ 2018-02-09  5:42 Alan Modra
  2018-02-09 14:11 ` Segher Boessenkool
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Modra @ 2018-02-09  5:42 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool

This PR is one of those with a really obvious cause, and fix.  There's
nothing in the unspec rtl to say the insn needs lr!
Bootstrapped and regression tested powerpc64le-linux.  OK?

	PR target/84300
gcc/
	* config/rs6000/rs6000.md (split_stack_return): Use LR.
gcc/testsuite/
	* gcc.dg/pr84300.c: New.

diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 33f0d95..287461f 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -13359,7 +13359,8 @@ (define_insn "load_split_stack_limit_si"
 ;; Use r0 to stop regrename twiddling with lr restore insns emitted
 ;; after the call to __morestack.
 (define_insn "split_stack_return"
-  [(unspec_volatile [(use (reg:SI 0))] UNSPECV_SPLIT_STACK_RETURN)]
+  [(unspec_volatile [(use (reg:SI 0)) (use (reg:SI LR_REGNO))]
+		    UNSPECV_SPLIT_STACK_RETURN)]
   ""
   "blr"
   [(set_attr "type" "jmpreg")])
diff --git a/gcc/testsuite/gcc.dg/pr84300.c b/gcc/testsuite/gcc.dg/pr84300.c
new file mode 100644
index 0000000..6016799
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr84300.c
@@ -0,0 +1,5 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target split_stack } */
+/* { dg-options "-g -O2 -fsplit-stack -fno-omit-frame-pointer" } */
+
+void trap () { __builtin_trap (); }

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-12 15:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-09  5:42 PR84300, ICE in dwarf2cfi on ppc64le Alan Modra
2018-02-09 14:11 ` Segher Boessenkool
2018-02-10  3:40   ` Alan Modra
2018-02-12 15:22     ` Segher Boessenkool

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).