Re: [PATCH] c++, v2: Drop TREE_READONLY on vars (possibly) initialized by tls wrapper [PR109164]

2023-03-20 Thread Jason Merrill via Gcc-patches
On 3/20/23 15:26, Jakub Jelinek wrote: On Mon, Mar 20, 2023 at 03:15:32PM -0400, Jason Merrill wrote: + else if (VAR_P (decl) + && CP_DECL_THREAD_LOCAL_P (decl) + && (!DECL_EXTERNAL (decl) || flag_extern_tls_init) Hmm, I wonder why we don't check the above line i

Re: [PATCH] c++, v2: Drop TREE_READONLY on vars (possibly) initialized by tls wrapper [PR109164]

2023-03-20 Thread Jakub Jelinek via Gcc-patches
On Mon, Mar 20, 2023 at 03:15:32PM -0400, Jason Merrill wrote: > > + else if (VAR_P (decl) > > + && CP_DECL_THREAD_LOCAL_P (decl) > > + && (!DECL_EXTERNAL (decl) || flag_extern_tls_init) > > Hmm, I wonder why we don't check the above line in var_needs_tls_wrapper? It is tes

Re: [PATCH] c++, v2: Drop TREE_READONLY on vars (possibly) initialized by tls wrapper [PR109164]

2023-03-20 Thread Jason Merrill via Gcc-patches
On 3/18/23 11:09, Jakub Jelinek wrote: On Sat, Mar 18, 2023 at 01:54:58PM +0100, Jakub Jelinek via Gcc-patches wrote: The patch is mostly about DECL_EXTERNAL cases, the others are supposedly handled by the var_definition_p code there (or at least I assumed; testcases certainly test only DECL_EXT

Re: [PATCH] c++, v2: Drop TREE_READONLY on vars (possibly) initialized by tls wrapper [PR109164]

2023-03-20 Thread Jakub Jelinek via Gcc-patches
On Sat, Mar 18, 2023 at 04:09:55PM +0100, Jakub Jelinek via Gcc-patches wrote: > On Sat, Mar 18, 2023 at 01:54:58PM +0100, Jakub Jelinek via Gcc-patches wrote: > > The patch is mostly about DECL_EXTERNAL cases, the others are supposedly > > handled by the var_definition_p code there (or at least I

[PATCH] c++, v2: Drop TREE_READONLY on vars (possibly) initialized by tls wrapper [PR109164]

2023-03-18 Thread Jakub Jelinek via Gcc-patches
On Sat, Mar 18, 2023 at 01:54:58PM +0100, Jakub Jelinek via Gcc-patches wrote: > The patch is mostly about DECL_EXTERNAL cases, the others are supposedly > handled by the var_definition_p code there (or at least I assumed; > testcases certainly test only DECL_EXTERNAL). > I guess it could be done i