This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] for PR 31771


Hello,

in move_block_to_fn, we assign copied blocks to the basic_block_info
array with last_basic_block index, instead of the real index of the
block, thus causing this bug.  Bootstrapped & regtested on i686.

Zdenek

	PR tree-optimization/31771
	* tree-cfg.c (move_block_to_fn): Assign bb to the correct index.

Index: tree-cfg.c
===================================================================
*** tree-cfg.c	(revision 124351)
--- tree-cfg.c	(working copy)
*************** move_block_to_fn (struct function *dest_
*** 4624,4630 ****
      }
  
    VEC_replace (basic_block, cfg->x_basic_block_info,
!                cfg->x_last_basic_block, bb);
  
    /* The statements in BB need to be associated with a new TREE_BLOCK.
       Labels need to be associated with a new label-to-block map.  */
--- 4624,4630 ----
      }
  
    VEC_replace (basic_block, cfg->x_basic_block_info,
!                bb->index, bb);
  
    /* The statements in BB need to be associated with a new TREE_BLOCK.
       Labels need to be associated with a new label-to-block map.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]