Commit b663bcf3 by Jason Merrill Committed by Jason Merrill

PR c++/4222, c++/5995

        PR c++/4222, c++/5995
        * call.c (build_over_call): Fix empty class logic.

From-SVN: r50978
parent cbb92744
2002-03-18 Jason Merrill <jason@redhat.com> 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 PR c++/3870
* cp-tree.h (struct saved_scope): Add last_parms field. * cp-tree.h (struct saved_scope): Add last_parms field.
* decl.c (maybe_push_to_top_level): Save last_function_parms. * decl.c (maybe_push_to_top_level): Save last_function_parms.
......
...@@ -4256,7 +4256,8 @@ build_over_call (cand, args, flags) ...@@ -4256,7 +4256,8 @@ build_over_call (cand, args, flags)
be touched as it might overlay things. When the be touched as it might overlay things. When the
gcc core learns about empty classes, we can treat it gcc core learns about empty classes, we can treat it
like other classes. */ 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 address;
tree to = stabilize_reference tree to = stabilize_reference
......
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
// This test case checks that the return value optimization works for // This test case checks that the return value optimization works for
// empty classes. // empty classes.
// xfailed because empty classes clobbering what they overlay as the // PR c++/5995
// backend treats them as single byte objects. See bug 4222
// execution test - XFAIL *-*-*
extern "C" void abort(); extern "C" void abort();
extern "C" int printf (const char *, ...); extern "C" int printf (const char *, ...);
......
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