Re: [PATCH v3] clear VLA bounds in attribute access (PR 97172)

2021-02-01 Thread Martin Sebor via Gcc-patches
On 2/1/21 9:27 AM, Jakub Jelinek wrote: On Mon, Feb 01, 2021 at 09:11:20AM -0700, Martin Sebor via Gcc-patches wrote: Because free_lang_data only frees anything when LTO is enabled and we want these trees cleared regardless to keep them from getting clobbered during gimplification, this change a

Re: [PATCH v3] clear VLA bounds in attribute access (PR 97172)

2021-02-01 Thread Jakub Jelinek via Gcc-patches
On Mon, Feb 01, 2021 at 09:11:20AM -0700, Martin Sebor via Gcc-patches wrote: > > > > Because free_lang_data only frees anything when LTO is enabled and > > > > we want these trees cleared regardless to keep them from getting > > > > clobbered during gimplification, this change also modifies the pa

Re: [PATCH v3] clear VLA bounds in attribute access (PR 97172)

2021-02-01 Thread Martin Sebor via Gcc-patches
On 1/28/21 1:59 PM, Martin Sebor wrote: On 1/28/21 1:31 AM, Richard Biener wrote: On Thu, Jan 28, 2021 at 12:08 AM Martin Sebor via Gcc-patches wrote: Attached is another attempt to fix the problem caused by allowing front-end trees representing nontrivial VLA bound expressions to stay in att

Re: [PATCH v3] clear VLA bounds in attribute access (PR 97172)

2021-01-28 Thread Martin Sebor via Gcc-patches
On 1/28/21 2:22 AM, Jakub Jelinek wrote: On Thu, Jan 28, 2021 at 09:31:46AM +0100, Richard Biener via Gcc-patches wrote: + if (TREE_CODE (bound) == PLUS_EXPR + && integer_all_onesp (TREE_OPERAND (bound, 1))) +{ + bound = TREE_OPERAND (bound, 0); + if (TREE_CODE (bound) == NOP

Re: [PATCH v3] clear VLA bounds in attribute access (PR 97172)

2021-01-28 Thread Martin Sebor via Gcc-patches
On 1/28/21 1:31 AM, Richard Biener wrote: On Thu, Jan 28, 2021 at 12:08 AM Martin Sebor via Gcc-patches wrote: Attached is another attempt to fix the problem caused by allowing front-end trees representing nontrivial VLA bound expressions to stay in attribute access attached to functions. Sin

Re: [PATCH v3] clear VLA bounds in attribute access (PR 97172)

2021-01-28 Thread Jakub Jelinek via Gcc-patches
On Thu, Jan 28, 2021 at 09:31:46AM +0100, Richard Biener via Gcc-patches wrote: > + if (TREE_CODE (bound) == PLUS_EXPR > + && integer_all_onesp (TREE_OPERAND (bound, 1))) > +{ > + bound = TREE_OPERAND (bound, 0); > + if (TREE_CODE (bound) == NOP_EXPR) > + bound = TREE_OPER

Re: [PATCH v3] clear VLA bounds in attribute access (PR 97172)

2021-01-28 Thread Richard Biener via Gcc-patches
On Thu, Jan 28, 2021 at 12:08 AM Martin Sebor via Gcc-patches wrote: > > Attached is another attempt to fix the problem caused by allowing > front-end trees representing nontrivial VLA bound expressions to > stay in attribute access attached to functions. Since removing > these trees seems to be

[PATCH v3] clear VLA bounds in attribute access (PR 97172)

2021-01-27 Thread Martin Sebor via Gcc-patches
Attached is another attempt to fix the problem caused by allowing front-end trees representing nontrivial VLA bound expressions to stay in attribute access attached to functions. Since removing these trees seems to be everyone's preference this patch does that by extending the free_lang_data pass