]> gcc.gnu.org Git - gcc.git/commitdiff
Clear currently_expanding_gimple_stmt properly
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 28 Feb 2022 23:18:04 +0000 (15:18 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 1 Mar 2022 14:18:31 +0000 (06:18 -0800)
commit a5883ba0de68efad36db145e75c86394d8bd44ea
Author: Michael Matz <matz@gcc.gnu.org>
Date:   Tue Nov 24 15:37:32 2009 +0000

introduced currently_expanding_gimple_stmt, which was set and cleared in
expand_gimple_basic_block when expanding gimple statement to RTL.  But it
isn't cleared when expand_gimple_basic_block returns inside the loop.

PR middle-end/104721
* cfgexpand.cc (expand_gimple_basic_block): Clear
currently_expanding_gimple_stmt when returning inside the loop.

gcc/cfgexpand.cc

index d51af2e3084f7e48c68df962859b888c5e16b956..87536ec7ccd46c802c3bc7de6a9496cb96da3a52 100644 (file)
@@ -5927,7 +5927,10 @@ expand_gimple_basic_block (basic_block bb, bool disable_tail_calls)
        {
          new_bb = expand_gimple_cond (bb, as_a <gcond *> (stmt));
          if (new_bb)
-           return new_bb;
+           {
+             currently_expanding_gimple_stmt = NULL;
+             return new_bb;
+           }
        }
       else if (is_gimple_debug (stmt))
        {
@@ -6049,7 +6052,10 @@ expand_gimple_basic_block (basic_block bb, bool disable_tail_calls)
                  if (can_fallthru)
                    bb = new_bb;
                  else
-                   return new_bb;
+                   {
+                     currently_expanding_gimple_stmt = NULL;
+                     return new_bb;
+                   }
                }
            }
          else
This page took 0.069489 seconds and 5 git commands to generate.