Re: [patch for gcc12 stage1][version 2] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-05-05 Thread Qing Zhao via Gcc-patches
> >> >>> @@ -11950,6 +12088,72 @@ lower_bound_in_type (tree outer, tree inner) >>>} >>> } >>> >>> +/* Returns true when the given TYPE has padding inside it. >>> + return false otherwise. */ >>> +bool >>> +type_has_padding (tree type) >> >> Would it be possible to reuse

Re: [patch for gcc12 stage1][version 2] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-05-05 Thread Qing Zhao via Gcc-patches
Hi, Richard, During the change for the 2nd version based on your previous comments, I have the following questions need your help: > >> + sra_stats.subtree_deferred_init++; >> +} >> + else if (access->grp_to_be_debug_replaced) >> +{ >> + /* FIXME, this part might have

Re: [patch for gcc12 stage1][version 2] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-04-27 Thread Qing Zhao via Gcc-patches
> On Apr 27, 2021, at 1:30 AM, Richard Biener wrote: > >> >> equivalent in all respects. And if we were trying to make them >> equivalent, we'd need to do much more than this. >> >> The same applies to the pattern case. If “x” is initialised to a pattern >> that happens to point to a real

Re: [patch for gcc12 stage1][version 2] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-04-27 Thread Richard Biener
On Mon, 26 Apr 2021, Richard Sandiford wrote: > Qing Zhao writes: > >>> @@ -1831,6 +2000,17 @@ gimplify_decl_expr (tree *stmt_p, gimple_seq > >>> *seq_p) > >>> as they may contain a label address. */ > >>> walk_tree (, force_labels_r, NULL, NULL); > >>> } > >>> + /* When

Re: [patch for gcc12 stage1][version 2] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-04-26 Thread Qing Zhao via Gcc-patches
> On Apr 26, 2021, at 12:47 PM, Richard Sandiford > wrote: > > Qing Zhao writes: @@ -1831,6 +2000,17 @@ gimplify_decl_expr (tree *stmt_p, gimple_seq *seq_p) as they may contain a label address. */ walk_tree (, force_labels_r, NULL, NULL); } +

Re: [patch for gcc12 stage1][version 2] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-04-26 Thread Richard Sandiford via Gcc-patches
Qing Zhao writes: >>> @@ -1831,6 +2000,17 @@ gimplify_decl_expr (tree *stmt_p, gimple_seq *seq_p) >>>as they may contain a label address. */ >>> walk_tree (, force_labels_r, NULL, NULL); >>> } >>> + /* When there is no explicit initializer, if the user requested, >>>

Re: [patch for gcc12 stage1][version 2] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-04-26 Thread Qing Zhao via Gcc-patches
Hi, Richard, Thanks a lot for your review. > On Apr 23, 2021, at 2:05 PM, Richard Sandiford > wrote: > > Finally getting to this now that the GCC 11 rush is over. Sorry for > the slow response. > > I've tried to review most of the code below, but skipped the testsuite > parts in the

Re: [patch for gcc12 stage1][version 2] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-04-23 Thread Kees Cook via Gcc-patches
On Fri, Apr 23, 2021 at 08:05:29PM +0100, Richard Sandiford wrote: > Finally getting to this now that the GCC 11 rush is over. Sorry for > the slow response. > > I've tried to review most of the code below, but skipped the testsuite > parts in the interests of time. I'll probably have more

Re: [patch for gcc12 stage1][version 2] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-04-23 Thread Richard Sandiford via Gcc-patches
Finally getting to this now that the GCC 11 rush is over. Sorry for the slow response. I've tried to review most of the code below, but skipped the testsuite parts in the interests of time. I'll probably have more comments in future rounds, just wanted to get the ball rolling. This is realy

Re: [patch for gcc12 stage1][version 2] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-04-08 Thread Qing Zhao via Gcc-patches
Hi, Kees, Thanks a lot for your testing on the linux kernel, I am so happy that this time it works well. > On Apr 7, 2021, at 5:19 PM, Kees Cook wrote: > > On Wed, Mar 24, 2021 at 04:21:49PM -0500, Qing Zhao wrote: >> This is the 2nd version of the patch for the new security feature for GCC.

Re: [patch for gcc12 stage1][version 2] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-04-07 Thread Kees Cook via Gcc-patches
On Wed, Mar 24, 2021 at 04:21:49PM -0500, Qing Zhao wrote: > This is the 2nd version of the patch for the new security feature for GCC. > > Could you please take a look at it and let me know any comments and issues. This behaves perfectly as far as I'm able to test in the Linux kernel! Thank

Re: [patch for gcc12 stage1][version 2] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-04-07 Thread Qing Zhao via Gcc-patches
Ping > On Mar 24, 2021, at 4:21 PM, Qing Zhao via Gcc-patches > wrote: > > Hi, > > This is the 2nd version of the patch for the new security feature for GCC. > > Could you please take a look at it and let me know any comments and issues. > > Thanks. > > Qing > > **compared to Version