]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/45206 (ICE on __builtin_eh_return at -Os)
authorUros Bizjak <uros@gcc.gnu.org>
Tue, 7 Sep 2010 15:38:59 +0000 (17:38 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Tue, 7 Sep 2010 15:38:59 +0000 (17:38 +0200)
PR target/45206
* config/i386/i386.c (ix86_expand_epilogue): Mark SP valid after
eh_return fixup sequence.

testsuite/ChangeLog:

PR target/45206
* gcc.target/i386/pr45206.c: New test.

From-SVN: r163955

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

index 85ea9d492aa1a07b845e418d5884389f58766918..97f24154b5d2569cbf37077899ea18a6ba6173a4 100644 (file)
@@ -1,3 +1,9 @@
+2010-09-07  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/45206
+       * config/i386/i386.c (ix86_expand_epilogue): Mark SP as valid after
+       eh_return fixup sequence.
+
 2010-09-07  Jan Hubicka  <jh@suse.cz>
 
        * gimple.c (maybe_fold_reference): Verify that operand is
@@ -19,8 +25,7 @@
 
 2010-09-07  Richard Guenther  <rguenther@suse.de>
 
-       * tree-pretty-print.c (dump_generic_node): Dump void types
-       as void.
+       * tree-pretty-print.c (dump_generic_node): Dump void types as void.
 
 2010-09-07  Bernd Schmidt  <bernds@codesourcery.com>
 
index fac660b632e8c657f0422e7c460d7c1dbd711954..6c131a1f67e728fff2b0c7a8407a038dfc53a9fb 100644 (file)
@@ -10118,6 +10118,7 @@ ix86_expand_epilogue (int style)
                }
            }
          m->fs.sp_offset = UNITS_PER_WORD;
+         m->fs.sp_valid = true;
        }
     }
   else
index b2f4abad37e0638fccb61da1a8f9f45b2f2250d0..2a4496dcecea4391355ed856a78efa9e3ca103dc 100644 (file)
@@ -1,3 +1,8 @@
+2010-09-07  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/45206
+       * gcc.target/i386/pr45206.c: New test.
+
 2010-09-07  Hans-Peter Nilsson  <hp@axis.com>
 
        PR fortran/45505
diff --git a/gcc/testsuite/gcc.target/i386/pr45206.c b/gcc/testsuite/gcc.target/i386/pr45206.c
new file mode 100644 (file)
index 0000000..7dd4bd2
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-Os -fno-omit-frame-pointer" } */
+
+struct _Unwind_Context { void *ra; };
+
+long uw_install_context_1 (struct _Unwind_Context *, struct _Unwind_Context *);
+
+void _Unwind_RaiseException(void)
+{
+  struct _Unwind_Context this_context, cur_context;
+  long offset = uw_install_context_1 (&this_context, &cur_context);
+  void *handler = __builtin_frob_return_addr ((&cur_context)->ra);
+
+  __builtin_eh_return (offset, handler);
+}
+