]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR target/79494 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2330)
authorJakub Jelinek <jakub@redhat.com>
Tue, 30 May 2017 08:01:31 +0000 (10:01 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 30 May 2017 08:01:31 +0000 (10:01 +0200)
Backported from mainline
2017-02-21  Jakub Jelinek  <jakub@redhat.com>

PR target/79494
* config/i386/i386.c (ix86_expand_split_stack_prologue): Call
make_reg_eh_region_note_nothrow_nononlocal on call_insn.

* gcc.dg/pr79494.c: New test.

From-SVN: r248646

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr79494.c [new file with mode: 0644]

index b4d09b55d8dd5862c2c1ca60cbc05c20089da98c..8cc4d3660cae8c33058c75958b7f0e5101b4a0b8 100644 (file)
@@ -1,6 +1,12 @@
 2017-05-30  Jakub Jelinek  <jakub@redhat.com>
 
        Backported from mainline
+       2017-02-21  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/79494
+       * config/i386/i386.c (ix86_expand_split_stack_prologue): Call
+       make_reg_eh_region_note_nothrow_nononlocal on call_insn.
+
        2017-02-20  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/79568
index d9268c32673774d0ad101018b062a64f11c52c61..bdd91dc6d17047d68e73955936a29bb655ae1e31 100644 (file)
@@ -12698,6 +12698,8 @@ ix86_expand_split_stack_prologue (void)
                                GEN_INT (UNITS_PER_WORD), constm1_rtx,
                                NULL_RTX, false);
   add_function_usage_to (call_insn, call_fusage);
+  /* Indicate that this function can't jump to non-local gotos.  */
+  make_reg_eh_region_note_nothrow_nononlocal (as_a <rtx_insn *> (call_insn));
 
   /* In order to make call/return prediction work right, we now need
      to execute a return instruction.  See
index 8a6d56b515c3cc2b51fd996efa43bdbe45c3e9d4..8452081abc5be665f023e5ef331de6c1448532f2 100644 (file)
@@ -1,6 +1,11 @@
 2017-05-30  Jakub Jelinek  <jakub@redhat.com>
 
        Backported from mainline
+       2017-02-21  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/79494
+       * gcc.dg/pr79494.c: New test.
+
        2017-02-20  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/79568
diff --git a/gcc/testsuite/gcc.dg/pr79494.c b/gcc/testsuite/gcc.dg/pr79494.c
new file mode 100644 (file)
index 0000000..e8543f8
--- /dev/null
@@ -0,0 +1,22 @@
+/* PR target/79494 */
+/* { dg-do compile } */
+/* { dg-require-effective-target split_stack } */
+/* { dg-options "-O2 -fsplit-stack -g" } */
+
+void
+foo (int a)
+{
+  __label__ lab;
+  __attribute__((noinline, noclone)) void bar (int b)
+  {
+    switch (b)
+      {
+      case 1:
+       goto lab;
+      case 2:
+       goto lab;
+      }
+  }
+  bar (a);
+lab:;
+}