Commit 72e839ca by Paolo Carlini Committed by Paolo Carlini

re PR c++/65811 (ice in vague_linkage_p)

/cp
2015-06-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/65811
	* decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.

/testsuite
2015-06-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/65811
	* g++.dg/other/linkage2.C: New.

From-SVN: r224888
parent 61c580ea
2015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/65811
* decl.c (duplicate_decls): Adjust DECL_COMDAT of newdecl.
2015-06-23 Patrick Palka <ppalka@gcc.gnu.org>
PR c++/30044
......
......@@ -2106,6 +2106,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
TREE_STATIC (olddecl) = TREE_STATIC (newdecl) |= TREE_STATIC (olddecl);
if (! DECL_EXTERNAL (olddecl))
DECL_EXTERNAL (newdecl) = 0;
if (! DECL_COMDAT (olddecl))
DECL_COMDAT (newdecl) = 0;
new_template_info = NULL_TREE;
if (DECL_LANG_SPECIFIC (newdecl) && DECL_LANG_SPECIFIC (olddecl))
......
2015-06-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/65811
* g++.dg/other/linkage2.C: New.
2015-06-24 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
PR target/63408
......
// PR c++/65811
struct foo { int i; };
static void fn1 ();
inline void
fn1 ()
{
static struct foo a[1];
}
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