http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47952

--- Comment #12 from Patrick Marlier <patrick.marlier at gmail dot com> 
2011-03-10 14:19:35 UTC ---
On 03/10/2011 12:01 AM, rth at gcc dot gnu.org wrote:
> I suspect, but have not yet verified, that this is related to
>    // Inhibit implicit instantiations for required instantiations,
>    // which are defined via explicit instantiations elsewhere.
>    // NB: This syntax is a GNU extension.
> #if _GLIBCXX_EXTERN_TEMPLATE>  0
>    extern template class basic_string<char>;
>
> in that we're copying the "is extern" bit, which is not true for
> the transactional clone.

I don't know if it is related but I have another bug which may be 
related with template.

In a relaxed transaction, some functions (stl? template?) in a 
transaction doesn't call the clone version (nor call to 
ITM_changeTransactionMode).
You can verify this in the function stepDestroyBuildings 
(_ZL20stepDestroyBuildingsi) in src/Tean.cpp, the function 
_ZNSt4listIP8BuildingSaIS1_EE5beginEv is called directly (not the clone, 
no irrevocable mode) even if in a transaction.

I had a quick look and the clone function exists but seems not be 
replaced (the begin attribute doesn't say irrevocable and no 
changeMode). It seems to happen when one transaction is followed by 
another one (Not sure if it is the cause)

I would like to have a look at it but I will be on vacation next week 
and I have to finish urgent things...

(I have added Aldy as CC since he also has glob2 and it might interest him)

Should I fill a new PR for this even if I don't have any real testcase?

Thanks.
Patrick.

Reply via email to