Commit 92d0af97 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/32596 (ICE with inline template specialization in anonymous namespace)

	PR c++/32596
	PR c++/32400
	* pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
	and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.

	* g++.dg/ext/visibility/anon5.C: New test.

From-SVN: r127863
parent 6a1eb6a4
2007-08-28 Jakub Jelinek <jakub@redhat.com>
PR c++/32596
PR c++/32400
* pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
2007-08-27 Jason Merrill <jason@redhat.com>
PR c++/28558
......
......@@ -2217,6 +2217,11 @@ check_explicit_specialization (tree declarator,
/* This specialization has the same linkage and visibility as
the function template it specializes. */
TREE_PUBLIC (decl) = TREE_PUBLIC (tmpl_func);
if (! TREE_PUBLIC (decl))
{
DECL_INTERFACE_KNOWN (decl) = 1;
DECL_NOT_REALLY_EXTERN (decl) = 1;
}
DECL_THIS_STATIC (decl) = DECL_THIS_STATIC (tmpl_func);
if (DECL_VISIBILITY_SPECIFIED (tmpl_func))
{
......
2007-08-28 Jakub Jelinek <jakub@redhat.com>
PR c++/32596
* g++.dg/ext/visibility/anon5.C: New test.
2007-07-28 Dominique d'Humieres <dominiq@lps.ens.fr>
* gfortran.dg/gamma_4.f90: Fix large-real kind selection.
// PR c++/32596
// { dg-do compile }
namespace
{
template<class T> inline void char_less(void) { }
template<> inline void char_less<char>(void) { }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment