Commit c5c90089 by Jason Merrill Committed by Jason Merrill

re PR c++/51812 (Virtual public inheritance and thunks leads to "undefined…

re PR c++/51812 (Virtual public inheritance and thunks leads to "undefined reference" in header files.)

	PR c++/51812
	* cgraphunit.c (cgraph_decide_is_function_needed): Don't always
	output static aliases.

From-SVN: r183475
parent 5460e1fc
2012-01-24 Jason Merrill <jason@redhat.com>
PR c++/51812
* cgraphunit.c (cgraph_decide_is_function_needed): Don't always
output static aliases.
2012-01-24 Jakub Jelinek <jakub@redhat.com> 2012-01-24 Jakub Jelinek <jakub@redhat.com>
PR driver/47249 PR driver/47249
......
...@@ -195,6 +195,7 @@ cgraph_decide_is_function_needed (struct cgraph_node *node, tree decl) ...@@ -195,6 +195,7 @@ cgraph_decide_is_function_needed (struct cgraph_node *node, tree decl)
to change the behavior here. */ to change the behavior here. */
if (((TREE_PUBLIC (decl) if (((TREE_PUBLIC (decl)
|| (!optimize || (!optimize
&& !node->same_body_alias
&& !DECL_DISREGARD_INLINE_LIMITS (decl) && !DECL_DISREGARD_INLINE_LIMITS (decl)
&& !DECL_DECLARED_INLINE_P (decl) && !DECL_DECLARED_INLINE_P (decl)
&& !(DECL_CONTEXT (decl) && !(DECL_CONTEXT (decl)
......
2012-01-24 Jason Merrill <jason@redhat.com>
PR c++/51812
* g++.dg/inherit/covariant20.C: New.
2012-01-24 Paolo Carlini <paolo.carlini@oracle.com> 2012-01-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51223 PR c++/51223
......
// PR c++/51812
// { dg-do link }
class Object {
virtual Object* clone() const;
};
class DNA: virtual public Object {
virtual DNA* clone() const {return new DNA(*this);}
};
int main() { }
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