Commit 00a42fb3 by Aldy Hernandez Committed by Aldy Hernandez

+ PR c++/51928 + * class.c (set_method_tm_attributes): Use TARGET_THUNK instead...

+       PR c++/51928
+       * class.c (set_method_tm_attributes): Use TARGET_THUNK instead of
+       thunk for set_one_vmethod_tm_attributes.


Co-Authored-By: Patrick Marlier <patrick.marlier@gmail.com>

From-SVN: r183478
parent 1aa5d1c7
2012-01-24 Aldy Hernandez <aldyh@redhat.com>
Patrick Marlier <patrick.marlier@gmail.com>
PR c++/51928
* class.c (set_method_tm_attributes): Use TARGET_THUNK instead of
thunk for set_one_vmethod_tm_attributes.
2012-01-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51223
......
......@@ -4430,7 +4430,12 @@ set_method_tm_attributes (tree t)
tree vchain;
for (vchain = BINFO_VIRTUALS (TYPE_BINFO (t)); vchain;
vchain = TREE_CHAIN (vchain))
set_one_vmethod_tm_attributes (t, BV_FN (vchain));
{
fndecl = BV_FN (vchain);
if (DECL_THUNK_P (fndecl))
fndecl = THUNK_TARGET (fndecl);
set_one_vmethod_tm_attributes (t, fndecl);
}
}
/* If the class doesn't have an attribute, nothing more to do. */
......
/* { dg-do compile } */
/* { dg-options "-fgnu-tm" } */
struct A; // { dg-error "forward declaration of 'struct A'" }
struct B
{
virtual B* foo(A);
};
struct C : virtual B
{
virtual C* foo(A) { return 0; } // { dg-error "'<anonymous>' has incomplete type" }
};
C c;
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