Commit b2595987 by Nathan Sidwell Committed by Nathan Sidwell

[PR c++/85008] ICE looking for clone

https://gcc.gnu.org/ml/gcc-patches/2018-03/msg01129.html
	PR c++/85008
	* tree.c (decl_linkage): Use DECL_CLONED_FUNCTION_P.
	* decl2.c (vague_linkage_p): Likewise.

	PR c++/85008
	* g++.dg/pr85008.C: New.

From-SVN: r258738
parent 983d49dd
2018-03-21 Nathan Sidwell <nathan@acm.org>
PR c++/85008
* tree.c (decl_linkage): Use DECL_CLONED_FUNCTION_P.
* decl2.c (vague_linkage_p): Likewise.
2018-03-21 David Malcolm <dmalcolm@redhat.com>
PR c++/84994
......
......@@ -1940,7 +1940,7 @@ vague_linkage_p (tree decl)
if ((DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (decl)
|| DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl))
&& DECL_CHAIN (decl)
&& DECL_CLONED_FUNCTION (DECL_CHAIN (decl)))
&& DECL_CLONED_FUNCTION_P (DECL_CHAIN (decl)))
return vague_linkage_p (DECL_CHAIN (decl));
gcc_checking_assert (!DECL_COMDAT (decl));
......
......@@ -5022,7 +5022,7 @@ decl_linkage (tree decl)
if ((DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (decl)
|| DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl))
&& DECL_CHAIN (decl)
&& DECL_CLONED_FUNCTION (DECL_CHAIN (decl)))
&& DECL_CLONED_FUNCTION_P (DECL_CHAIN (decl)))
return decl_linkage (DECL_CHAIN (decl));
if (TREE_CODE (decl) == NAMESPACE_DECL)
......
2018-03-21 Nathan Sidwell <nathan@acm.org>
PR c++/85008
* g++.dg/pr85008.C: New.
2018-03-21 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/84615
......
// PR c++/85008 ICE concerning dtor clones
void a() {
struct b {
~b();
int r [!!&b::~b]; // { dg-error "address of " }
};
}
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