Commit 73f0dae2 by Marek Polacek Committed by Marek Polacek

re PR c++/69113 (ICE: in vague_linkage_p, at cp/decl2.c:1875 with -fno-weak)

	PR c++/69113
	* decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set.

	* g++.dg/pr69113.C: New test.

From-SVN: r232189
parent 20b8d734
2016-01-09 Marek Polacek <polacek@redhat.com>
PR c++/69113
* decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set.
2016-01-09 Jakub Jelinek <jakub@redhat.com>
PR c++/69164
......
......@@ -1820,7 +1820,8 @@ comdat_linkage (tree decl)
}
}
DECL_COMDAT (decl) = 1;
if (TREE_PUBLIC (decl))
DECL_COMDAT (decl) = 1;
}
/* For win32 we also want to put explicit instantiations in
......
2016-01-09 Marek Polacek <polacek@redhat.com>
PR c++/69113
* g++.dg/pr69113.C: New test.
2016-01-09 Jakub Jelinek <jakub@redhat.com>
PR middle-end/50865
......
// PR c++/69113
// { dg-do compile }
// { dg-options "-fno-weak" }
struct foo
{
static void bar ()
{
struct baz
{
static void m ()
{
static int n;
}
};
}
};
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