Commit 8b16faa2 by Mark Mitchell Committed by David S. Miller

class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if…

class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if TYPE_HAS_TRIVIAL_INIT_REF is false or...

2002-04-30  Mark Mitchell  <mark@codesourcery.com>

	* class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
	TYPE_HAS_TRIVIAL_INIT_REF is false or
	TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.

From-SVN: r52976
parent 4be9e9cb
2002-04-30 Mark Mitchell <mark@codesourcery.com>
* class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
TYPE_HAS_TRIVIAL_INIT_REF is false or
TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
2002-04-30 Jason Merrill <jason@redhat.com> 2002-04-30 Jason Merrill <jason@redhat.com>
* decl.c (grokdeclarator): Don't override TYPE_NAME of an * decl.c (grokdeclarator): Don't override TYPE_NAME of an
......
...@@ -1882,15 +1882,8 @@ finish_struct_bits (t) ...@@ -1882,15 +1882,8 @@ finish_struct_bits (t)
/* If this type has a copy constructor or a destructor, force its mode to /* If this type has a copy constructor or a destructor, force its mode to
be BLKmode, and force its TREE_ADDRESSABLE bit to be nonzero. This be BLKmode, and force its TREE_ADDRESSABLE bit to be nonzero. This
will cause it to be passed by invisible reference and prevent it from will cause it to be passed by invisible reference and prevent it from
being returned in a register. being returned in a register. */
if (! TYPE_HAS_TRIVIAL_INIT_REF (t) || TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t))
Also do this if the class has BLKmode but can still be returned in
registers, since function_cannot_inline_p won't let us inline
functions returning such a type. This affects the HP-PA. */
if (! TYPE_HAS_TRIVIAL_INIT_REF (t)
|| TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)
|| (TYPE_MODE (t) == BLKmode && ! aggregate_value_p (t)
&& CLASSTYPE_NON_AGGREGATE (t)))
{ {
tree variants; tree variants;
DECL_MODE (TYPE_MAIN_DECL (t)) = BLKmode; DECL_MODE (TYPE_MAIN_DECL (t)) = BLKmode;
......
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