Re: c++: local externs in templates do not get template head

2020-09-15 Thread Nathan Sidwell
On 9/14/20 6:47 PM, Tobias Burnus wrote: This patch cause run-time fails for   g++ -fopenmp libgomp/testsuite/libgomp.c++/udr-13.C The follow-up fix does not help. Namely, in udr-3.C:115: 115 if (t.s != 11 || v.v != 9 || q != 0 || d != 3.0) abort (); (gdb) p t.s oops, I forgot t

Re: c++: local externs in templates do not get template head

2020-09-14 Thread Tobias Burnus
This patch cause run-time fails for g++ -fopenmp libgomp/testsuite/libgomp.c++/udr-13.C The follow-up fix does not help. Namely, in udr-3.C:115: 115 if (t.s != 11 || v.v != 9 || q != 0 || d != 3.0) abort (); (gdb) p t.s $1 = 11 (gdb) p v.v $2 = 4 (gdb) p q $3 = 0 (gdb) p d $4 = 3

Re: c++: local externs in templates do not get template head

2020-09-14 Thread Marek Polacek via Gcc-patches
On Mon, Sep 14, 2020 at 12:53:18PM -0400, Nathan Sidwell wrote: > On 9/14/20 12:49 PM, Marek Polacek wrote: > > On Mon, Sep 14, 2020 at 12:45:33PM -0400, Nathan Sidwell wrote: > > > Now we consistently mark local externs with DECL_LOCAL_DECL_P, we can > > > teach the template machinery not to give

Re: c++: local externs in templates do not get template head

2020-09-14 Thread Nathan Sidwell
On 9/14/20 12:49 PM, Marek Polacek wrote: On Mon, Sep 14, 2020 at 12:45:33PM -0400, Nathan Sidwell wrote: Now we consistently mark local externs with DECL_LOCAL_DECL_P, we can teach the template machinery not to give them a TEMPLATE_DECL head, and the instantiation machinery treat them as the lo

Re: c++: local externs in templates do not get template head

2020-09-14 Thread Marek Polacek via Gcc-patches
On Mon, Sep 14, 2020 at 12:45:33PM -0400, Nathan Sidwell wrote: > Now we consistently mark local externs with DECL_LOCAL_DECL_P, we can > teach the template machinery not to give them a TEMPLATE_DECL head, > and the instantiation machinery treat them as the local specialiations > they are. (openmp

c++: local externs in templates do not get template head

2020-09-14 Thread Nathan Sidwell
Now we consistently mark local externs with DECL_LOCAL_DECL_P, we can teach the template machinery not to give them a TEMPLATE_DECL head, and the instantiation machinery treat them as the local specialiations they are. (openmp UDRs also fall into this category, and are dealt with similarly.)