Re: [PATCH v4] c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]

2024-01-25 Thread Jason Merrill
On 1/25/24 21:28, Nathaniel Shead wrote: On Wed, Jan 24, 2024 at 03:24:42PM -0500, Jason Merrill wrote: On 1/20/24 05:45, Nathaniel Shead wrote: I also included your change to only add class variable templates to 'pending_statics' (and the normal 'static_decl's for non-class otherwise) as

[PATCH v4] c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]

2024-01-25 Thread Nathaniel Shead
On Wed, Jan 24, 2024 at 03:24:42PM -0500, Jason Merrill wrote: > On 1/20/24 05:45, Nathaniel Shead wrote: > > I also included > > your change to only add class variable templates to 'pending_statics' > > (and the normal 'static_decl's for non-class otherwise) as otherwise I > > could imagine that

Re: [PATCH v3] c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]

2024-01-24 Thread Jason Merrill
On 1/20/24 05:45, Nathaniel Shead wrote: On Fri, Jan 19, 2024 at 01:57:18PM -0500, Patrick Palka wrote: On Wed, 3 Jan 2024, Nathaniel Shead wrote: + if (DECL_CONTEXT (decl) + && RECORD_OR_UNION_TYPE_P (DECL_CONTEXT (decl)) + && !DECL_TEMPLATE_INFO (decl)) +

[PATCH v3] c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]

2024-01-20 Thread Nathaniel Shead
On Fri, Jan 19, 2024 at 01:57:18PM -0500, Patrick Palka wrote: > On Wed, 3 Jan 2024, Nathaniel Shead wrote: > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > > > -- >8 -- > > > > Static data members marked 'inline' should be emitted in TUs where they > > are ODR-used.

Re: c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]

2024-01-19 Thread Patrick Palka
On Wed, 3 Jan 2024, Nathaniel Shead wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > -- >8 -- > > Static data members marked 'inline' should be emitted in TUs where they > are ODR-used. We need to make sure that statics imported from modules > are correctly added

Re: c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]

2024-01-08 Thread Jason Merrill
On 1/8/24 04:21, Iain Sandoe wrote: On 6 Jan 2024, at 22:30, Nathan Sidwell wrote: Richard Smith & I discussed whether we should use the module interface's capability of giving vague linkage entities a strong location. I didn't want to go messing with that, 'cos it was changing yet more

Re: c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]

2024-01-08 Thread Iain Sandoe
> On 6 Jan 2024, at 22:30, Nathan Sidwell wrote: > > Richard Smith & I discussed whether we should use the module interface's > capability of giving vague linkage entities a strong location. I didn't want > to go messing with that, 'cos it was changing yet more stuff. > > But, perhaps we

Re: c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]

2024-01-06 Thread Nathan Sidwell
Richard Smith & I discussed whether we should use the module interface's capability of giving vague linkage entities a strong location. I didn't want to go messing with that, 'cos it was changing yet more stuff. But, perhaps we should revisit that? Any keyless polymorphic class in module

Re: c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]

2024-01-04 Thread Jason Merrill
On 1/4/24 18:02, Nathaniel Shead wrote: On Thu, Jan 04, 2024 at 05:42:34PM -0500, Jason Merrill wrote: On 1/4/24 17:24, Nathaniel Shead wrote: On Thu, Jan 04, 2024 at 03:31:50PM -0500, Jason Merrill wrote: On 1/2/24 17:40, Nathaniel Shead wrote: Static data members marked 'inline' should be

Re: c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]

2024-01-04 Thread Nathaniel Shead
On Thu, Jan 04, 2024 at 05:42:34PM -0500, Jason Merrill wrote: > On 1/4/24 17:24, Nathaniel Shead wrote: > > On Thu, Jan 04, 2024 at 03:31:50PM -0500, Jason Merrill wrote: > > > On 1/2/24 17:40, Nathaniel Shead wrote: > > > > Static data members marked 'inline' should be emitted in TUs where they

Re: c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]

2024-01-04 Thread Jason Merrill
On 1/4/24 17:24, Nathaniel Shead wrote: On Thu, Jan 04, 2024 at 03:31:50PM -0500, Jason Merrill wrote: On 1/2/24 17:40, Nathaniel Shead wrote: Static data members marked 'inline' should be emitted in TUs where they are ODR-used. We need to make sure that statics imported from modules are

Re: c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]

2024-01-04 Thread Nathaniel Shead
On Thu, Jan 04, 2024 at 03:31:50PM -0500, Jason Merrill wrote: > On 1/2/24 17:40, Nathaniel Shead wrote: > > Static data members marked 'inline' should be emitted in TUs where they > > are ODR-used. We need to make sure that statics imported from modules > > are correctly added to the

Re: c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]

2024-01-04 Thread Jason Merrill
On 1/2/24 17:40, Nathaniel Shead wrote: Static data members marked 'inline' should be emitted in TUs where they are ODR-used. We need to make sure that statics imported from modules are correctly added to the 'pending_statics' map so that they get emitted if needed, otherwise the attached

:Re: [PATCH v2] c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]

2024-01-04 Thread Patrick Palka
On Wed, 3 Jan 2024, Nathaniel Shead wrote: > Linaro CI tells me that this patch caused regressions on ARM. I don't > have an ARM machine available to test on, but it appears to have been > caused by attempting to stream vtables as static data members, and ARM > having different behaviour with

[PATCH v2] c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]

2024-01-03 Thread Nathaniel Shead
Linaro CI tells me that this patch caused regressions on ARM. I don't have an ARM machine available to test on, but it appears to have been caused by attempting to stream vtables as static data members, and ARM having different behaviour with regards to when DECL_INTERFACE_KNOWN is marked on

[PATCH] c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]

2024-01-02 Thread Nathaniel Shead
(Whoops, forgot the '[PATCH]', fixed the subject in email.) On Wed, Jan 03, 2024 at 09:40:55AM +1100, Nathaniel Shead wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > -- >8 -- > > Static data members marked 'inline' should be emitted in TUs where they > are

c++/modules: Emit definitions of ODR-used static members imported from modules [PR112899]

2024-01-02 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- Static data members marked 'inline' should be emitted in TUs where they are ODR-used. We need to make sure that statics imported from modules are correctly added to the 'pending_statics' map so that they get emitted if