diff mbox series

predcom: Fix up component::component [PR105056]

Message ID Yj7SthxrXRlW3IBn@tucnak
State New
Headers show
Series predcom: Fix up component::component [PR105056] | expand

Commit Message

Jakub Jelinek March 26, 2022, 8:46 a.m. UTC
Hi!

The recent change didn't initialize comp_step while previously we used
XCNEW to allocate it.

I think RS_ANY is better than RS_INTERNAL (== 0) as the default.

Bootstrappedd/regtested on x86_64-linux and i686-linux, ok for trunk?

2022-03-26  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/105056
	* tree-predcom.cc (component::component): Initialize also comp_step.


	Jakub

Comments

Richard Biener March 28, 2022, 7:47 a.m. UTC | #1
On Sat, 26 Mar 2022, Jakub Jelinek wrote:

> Hi!
> 
> The recent change didn't initialize comp_step while previously we used
> XCNEW to allocate it.
> 
> I think RS_ANY is better than RS_INTERNAL (== 0) as the default.
> 
> Bootstrappedd/regtested on x86_64-linux and i686-linux, ok for trunk?

OK.

> 2022-03-26  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR tree-optimization/105056
> 	* tree-predcom.cc (component::component): Initialize also comp_step.
> 
> --- gcc/tree-predcom.cc.jj	2022-03-24 12:23:11.000000000 +0100
> +++ gcc/tree-predcom.cc	2022-03-25 17:50:09.238282600 +0100
> @@ -367,7 +367,8 @@ enum ref_step_type
>  
>  struct component
>  {
> -  component (bool es) : eliminate_store_p (es), next (NULL) {}
> +  component (bool es) : comp_step (RS_ANY), eliminate_store_p (es),
> +    next (NULL) {}
>  
>    /* The references in the component.  */
>    auto_vec<dref> refs;
> 
> 	Jakub
> 
>
diff mbox series

Patch

--- gcc/tree-predcom.cc.jj	2022-03-24 12:23:11.000000000 +0100
+++ gcc/tree-predcom.cc	2022-03-25 17:50:09.238282600 +0100
@@ -367,7 +367,8 @@  enum ref_step_type
 
 struct component
 {
-  component (bool es) : eliminate_store_p (es), next (NULL) {}
+  component (bool es) : comp_step (RS_ANY), eliminate_store_p (es),
+    next (NULL) {}
 
   /* The references in the component.  */
   auto_vec<dref> refs;