re PR middle-end/19225 (g++.dg/eh/omit-frame-pointer2.C fails with -fpic/-fPIC on...
authorDale Johannesen <dalej@apple.com>
Wed, 30 Mar 2005 20:21:37 +0000 (20:21 +0000)
committerDale Johannesen <dalej@gcc.gnu.org>
Wed, 30 Mar 2005 20:21:37 +0000 (20:21 +0000)
2005-03-30  Dale Johannesen  <dalej@apple.com>

        PR middle-end/19225
        * calls.c (expand_call):  Flush pending deferrals before
        throwing call.

From-SVN: r97277

gcc/ChangeLog
gcc/calls.c

index f65e3f9f98c641138a9aacedf2b1035c65945d4a..1d20452dc322a6246445af38dc3eae348c26451f 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-30  Dale Johannesen  <dalej@apple.com>
+
+       PR middle-end/19225
+       * calls.c (expand_call):  Flush pending deferrals before
+       throwing call.
+
 2005-03-30  Joseph S. Myers  <joseph@codesourcery.com>
 
        PR c/772
index 54307bf4be55d2ff9c688adb5123db6e9bdf1c6c..3eb16c023d10f0be416196e189702e76936fb815 100644 (file)
@@ -2261,10 +2261,14 @@ expand_call (tree exp, rtx target, int ignore)
         Also, do all pending adjustments now if there is any chance
         this might be a call to alloca or if we are expanding a sibling
         call sequence or if we are calling a function that is to return
-        with stack pointer depressed.  */
+        with stack pointer depressed.
+        Also do the adjustments before a throwing call, otherwise
+        exception handling can fail; PR 19225. */
       if (pending_stack_adjust >= 32
          || (pending_stack_adjust > 0
              && (flags & (ECF_MAY_BE_ALLOCA | ECF_SP_DEPRESSED)))
+         || (pending_stack_adjust > 0
+             && flag_exceptions && !(flags & ECF_NOTHROW))
          || pass == 0)
        do_pending_stack_adjust ();