Re: C++ PATCH to set DECL_COMDAT on undefined inlines/templates

2014-08-19 Thread Jason Merrill
Another needed tweak, applying to trunk. commit aac24a75af315fb6aa6099a159c6bce339706bc1 Author: Jason Merrill Date: Mon Aug 18 21:34:12 2014 -0400 PR lto/53808 PR c++/61659 * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger comdat_linkage. diff --git a/gcc/c

Re: C++ PATCH to set DECL_COMDAT on undefined inlines/templates

2014-07-30 Thread Markus Trippelsdorf
On 2014.07.30 at 17:31 -0400, Jason Merrill wrote: > I think this should fix it. Indeed it does. Thanks. -- Markus

Re: C++ PATCH to set DECL_COMDAT on undefined inlines/templates

2014-07-30 Thread Jason Merrill
I think this should fix it. Applying to trunk. commit 939c2c7101765c2ac83c85871fa38cc2278a2e18 Author: Jason Merrill Date: Wed Jul 30 17:19:23 2014 -0400 PR lto/53808 PR c++/61659 * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends. diff --git a/gcc/cp/pt.c b/g

Re: C++ PATCH to set DECL_COMDAT on undefined inlines/templates

2014-07-30 Thread Jason Merrill
On 07/30/2014 02:05 PM, Markus Trippelsdorf wrote: It breaks Firefox build: /sigh. I haven't looked deeper yet. Let me know what you find. Thanks, Jason

Re: C++ PATCH to set DECL_COMDAT on undefined inlines/templates

2014-07-30 Thread Markus Trippelsdorf
On 2014.07.30 at 13:26 -0400, Jason Merrill wrote: > Since can_refer_decl_in_current_unit_p doesn't allow references to > DECL_COMDAT entities that aren't defined in the current unit, by setting > that flag we can avoid problems with devirtualization introducing > references to vague linkage fun

C++ PATCH to set DECL_COMDAT on undefined inlines/templates

2014-07-30 Thread Jason Merrill
Since can_refer_decl_in_current_unit_p doesn't allow references to DECL_COMDAT entities that aren't defined in the current unit, by setting that flag we can avoid problems with devirtualization introducing references to vague linkage functions that haven't been synthesized/instantiated because