Hi,

This is just a memo about why the testcase failed:

When it tries to compile, we get this:
gcc/testsuite/g++.dg/tm/pr47746.C:20:14: error: unsafe function call
‘void Building::load(InputStream*)’ within ‘transaction_safe’ function
  load(stream);

Indeed, with PIC, the 'load' method can be overloaded later so we
cannot infer that the body will be transaction_safe.
in trans-mem.c:
4461|   /* If we aren't seeing the final version of the function we don't
4462|      know what it will contain at runtime.  */
4463|   if (cgraph_function_body_availability (node) < AVAIL_AVAILABLE)
4464+>    return true;

The two ways to fix this, is either to force for non-pic target or to
add transaction_safe attribute to 'load' and 'readUint32' methods.
--
Patrick

Reply via email to