]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/19225 (g++.dg/eh/omit-frame-pointer2.C fails with -fpic/-fPIC on...
authorDale Johannesen <dalej@apple.com>
Wed, 6 Apr 2005 21:01:44 +0000 (21:01 +0000)
committerDale Johannesen <dalej@gcc.gnu.org>
Wed, 6 Apr 2005 21:01:44 +0000 (21:01 +0000)
2005-04-06  Dale Johannesen  <dalej@apple.com>

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

From-SVN: r97748

gcc/ChangeLog
gcc/calls.c

index 37f89d47a1ee988110a94ad970d4a29a47c6ddfd..6278b8b8e34e809b437ed85ac3727a786091b59d 100644 (file)
@@ -1,3 +1,9 @@
+2005-04-06  Dale Johannesen  <dalej@apple.com>
+
+        PR middle-end/19225
+        * calls.c (expand_call):  Flush pending deferrals before
+        throwing call.
+
 2005-04-06  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        PR target/17245
index c1b900b7d8ba4fe3fb2d1011759c663767204c4e..86e51842cf5a50772c0ba00c58cce3ccabfbc6f7 100644 (file)
@@ -2730,10 +2730,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 ();