]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if TYPE_HAS_TRIVIAL_INIT_REF...
authorMark Mitchell <mark@codesourcery.com>
Tue, 30 Apr 2002 21:53:02 +0000 (21:53 +0000)
committerDavid S. Miller <davem@gcc.gnu.org>
Tue, 30 Apr 2002 21:53:02 +0000 (14:53 -0700)
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: r52975

gcc/cp/ChangeLog
gcc/cp/class.c

index 554e539957f1c968e7067927d997266f6ec24cd1..6403c9dc7675a7a6dc3576d1f51507ca37ee6de5 100644 (file)
@@ -1,3 +1,9 @@
+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>
 
        * decl.c (grokdeclarator): Don't override TYPE_NAME of an
index de9ce5b8f8b169b153110db8bfdff1eb8fad67af..82360b02c5984e939b00f3943b03af1ac4226b9f 100644 (file)
@@ -1853,15 +1853,8 @@ finish_struct_bits (t)
   /* 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
      will cause it to be passed by invisible reference and prevent it from
-     being returned in a register.
-
-     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)))
+     being returned in a register.  */
+  if (! TYPE_HAS_TRIVIAL_INIT_REF (t) || TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t))
     {
       tree variants;
       DECL_MODE (TYPE_MAIN_DECL (t)) = BLKmode;