> On Sep 7, 2021, at 11:57 AM, Qing Zhao via Gcc-patches 
> <gcc-patches@gcc.gnu.org> wrote:
> 
> Hi, Richard,
> 
> Thanks a lot for your review.
> 
>> On Sep 6, 2021, at 5:16 AM, Richard Biener <rguent...@suse.de> wrote:
>> 
>> On Sat, 21 Aug 2021, Qing Zhao wrote:
>> 
>>> Hi,
>>> 
>>> This is the 8th version of the patch for the new security feature for GCC.
>>> I have tested it with bootstrap on both x86 and aarch64, regression testing 
>>> on both x86 and aarch64.
>>> Also tested it with the kernel testing case provided by Kees.
>>> Also compile CPU2017 (running is ongoing), without any issue.
>>> 
>>> Please take a look at this patch and let me know any issues.
>> 
>> +  /* If this DECL is a VLA, a temporary address variable for it has been
>> +     created, the replacement for DECL is recorded in DECL_VALUE_EXPR 
>> (decl),
>> +     we should use it as the LHS of the call.  */
>> +
>> +  tree lhs_call
>> +    = is_vla ? DECL_VALUE_EXPR (decl) : decl;
>> +  gimplify_assign (lhs_call, call, seq_p);
>> 
>> you shouldn't need to replace the lhs with DECL_VALUE_EXPR of it
>> here, gimplify_assign should take care of that.
> 
> Okay, I see.
> 
> I will change the above sequence simply to the following:
> 
> -  /* If this DECL is a VLA, a temporary address variable for it has been
> -     created, the replacement for DECL is recorded in DECL_VALUE_EXPR (decl),
> -     we should use it as the LHS of the call.  */
> -
> -  tree lhs_call
> -    = is_vla ? DECL_VALUE_EXPR (decl) : decl;
>   gimplify_assign (lhs_call, call, seq_p);
> }
> 

Changes here should be:

-  /* If this DECL is a VLA, a temporary address variable for it has been
-     created, the replacement for DECL is recorded in DECL_VALUE_EXPR (decl),
-     we should use it as the LHS of the call.  */
-
-  tree lhs_call
-    = is_vla ? DECL_VALUE_EXPR (decl) : decl;
-  gimplify_assign (lhs_call, call, seq_p);
+  gimplify_assign (decl, call, seq_p);
 }

Qing

Reply via email to