]> gcc.gnu.org Git - gcc.git/commitdiff
PR c++/4222, c++/5995
authorJason Merrill <jason@redhat.com>
Mon, 18 Mar 2002 16:55:11 +0000 (11:55 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 18 Mar 2002 16:55:11 +0000 (11:55 -0500)
        PR c++/4222, c++/5995
        * call.c (build_over_call): Fix empty class logic.

From-SVN: r50978

gcc/cp/ChangeLog
gcc/cp/call.c
gcc/testsuite/g++.old-deja/g++.other/empty1.C

index c5b30b7dd94bba7f6e8ea04d6c684126f4f3758c..12d865e8bb89351cffb418c620d508b615aadb72 100644 (file)
@@ -1,5 +1,8 @@
 2002-03-18  Jason Merrill  <jason@redhat.com>
 
+       PR c++/4222, c++/5995
+       * call.c (build_over_call): Fix empty class logic.
+
        PR c++/3870
        * cp-tree.h (struct saved_scope): Add last_parms field.
        * decl.c (maybe_push_to_top_level): Save last_function_parms.
index 0cb7dfce5c8a1413380d8c817ccfd65d5e16408c..9d26861cdec62cdafd93c0ded01c369e2d8db40f 100644 (file)
@@ -4256,7 +4256,8 @@ build_over_call (cand, args, flags)
                  be touched as it might overlay things. When the
                  gcc core learns about empty classes, we can treat it
                  like other classes. */
-              && !is_empty_class (DECL_CONTEXT (fn)))
+              && !(is_empty_class (DECL_CONTEXT (fn))
+                   && TYPE_HAS_TRIVIAL_INIT_REF (DECL_CONTEXT (fn))))
        {
          tree address;
          tree to = stabilize_reference
index a876ce84a9f14389ed3eb588b4625d30e751f426..b54490c9579f9a909f98b038329be5e75ef6b72d 100644 (file)
@@ -2,9 +2,7 @@
 // This test case checks that the return value optimization works for
 // empty classes.
 
-// xfailed because empty classes clobbering what they overlay as the
-// backend treats them as single byte objects. See bug 4222
-// execution test - XFAIL *-*-*
+// PR c++/5995
 
 extern "C" void abort();
 extern "C" int printf (const char *, ...);
This page took 0.092323 seconds and 5 git commands to generate.