Commit dca61c7e by Jan Hubicka Committed by Jan Hubicka

re PR regression/57551 (g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE)

	PR c++/57551
	* g++.dg/ext/visibility/anon6.C: Update testcase.
	* cp/pt.c (mark_decl_instantiated): Do not export explicit instantiations
	of anonymous namespace templates.

From-SVN: r199956
parent 97756c0e
2013-06-11 Jan Hubicka <jh@suse.cz>
PR c++/57551
* cp/pt.c (mark_decl_instantiated): Do not export explicit instantiations
of anonymous namespace templates.
2013-06-10 Jason Merrill <jason@redhat.com> 2013-06-10 Jason Merrill <jason@redhat.com>
* name-lookup.c (add_decl_to_level): Add decls in an anonymous * name-lookup.c (add_decl_to_level): Add decls in an anonymous
......
...@@ -17399,6 +17399,13 @@ mark_decl_instantiated (tree result, int extern_p) ...@@ -17399,6 +17399,13 @@ mark_decl_instantiated (tree result, int extern_p)
if (TREE_ASM_WRITTEN (result)) if (TREE_ASM_WRITTEN (result))
return; return;
/* For anonymous namespace we don't need to do anything. */
if (decl_anon_ns_mem_p (result))
{
gcc_assert (!TREE_PUBLIC (result));
return;
}
if (TREE_CODE (result) != FUNCTION_DECL) if (TREE_CODE (result) != FUNCTION_DECL)
/* The TREE_PUBLIC flag for function declarations will have been /* The TREE_PUBLIC flag for function declarations will have been
set correctly by tsubst. */ set correctly by tsubst. */
......
2013-06-11 Jan Hubicka <jh@suse.cz>
PR c++/57551
* g++.dg/ext/visibility/anon6.C: Update testcase.
2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com> 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
PR c/57563 PR c/57563
......
// PR c++/33094 // PR c++/33094
// { dg-final { scan-assembler "1BIiE1cE" } } // { dg-final { scan-assembler "1BIiE1cE" } }
// { dg-final { scan-assembler-not "globl.*1BIiE1cE" } } // { dg-final { scan-assembler-not "globl.*1BIiE1cE" } }
// { dg-final { scan-assembler-not "comdat" } }
// { dg-final { scan-assembler-not "weak" } }
// { dg-final { scan-assembler-not "1CIiE1cE" } } // { dg-final { scan-assembler-not "1CIiE1cE" } }
// Test that B<int>::c is emitted as an internal symbol, and C<int>::c is // Test that B<int>::c is emitted as an internal symbol, and C<int>::c is
...@@ -18,7 +20,7 @@ namespace ...@@ -18,7 +20,7 @@ namespace
template <typename T> template <typename T>
class B class B
{ {
static const T c = 0; __attribute__ ((__used__)) static const T c = 0;
}; };
template <typename T> const T B<T>::c; template <typename T> const T B<T>::c;
......
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