public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone
@ 2011-03-02 12:31 patrick.marlier at gmail dot com
  2011-03-02 19:04 ` [Bug c++/47952] " aldyh at gcc dot gnu.org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: patrick.marlier at gmail dot com @ 2011-03-02 12:31 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [trans-mem] undefined reference to transaction clone
           Product: gcc
           Version: trans-mem
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: patrick.marlier@gmail.com
                CC: rth@gcc.gnu.org, aldyh@gcc.gnu.org,
                    javier.arias@bsc.es


Created attachment 23513
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23513
attached almost reduced testcase.

An undefined reference to a transaction clone appears at link time.

$ g++ -save-temps -O0 -c -Wall -fgnu-tm testcase.i

testcase.o:(.tm_clone_table+0x8): undefined reference to `transaction clone for
std::_List_iterator<Game::BuildProject>::_List_iterator(std::_List_node_base*)'

The testcase is not completely reduced... I will post it a better one soon.

Considered it as high priority since it happens in the Velox stack. Thanks :)

Patrick.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
@ 2011-03-02 19:04 ` aldyh at gcc dot gnu.org
  2011-03-07 15:32 ` aldyh at gcc dot gnu.org
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: aldyh at gcc dot gnu.org @ 2011-03-02 19:04 UTC (permalink / raw)
  To: gcc-bugs

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

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2011.03.02 19:03:48
     Ever Confirmed|0                           |1

--- Comment #1 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2011-03-02 19:03:48 UTC ---
I can't reproduce the error.  Instead, I get:

houston:/build/tm/gcc$ /build/tm/install/bin/c++ a.c -fgnu-tm -O0 -fgnu-tm
-litm
/usr/lib/../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
/tmp/ccOXn6kg.o: In function `buildProjectSyncStepConcurrently()':
a.c:(.text+0x23): undefined reference to `transaction clone for
Game::isHardSpaceForBuilding()'
/tmp/ccOXn6kg.o: In function `transaction clone for
buildProjectSyncStepConcurrently()':
a.c:(.text+0xe0): undefined reference to `transaction clone for
Game::isHardSpaceForBuilding()'
collect2: ld returned 1 exit status

As I see no definition for isHardSpaceForBuilding() in the source (just a
prototype), I expect this error.

Did you give me an incorrect testcase, or perhaps this is a binutils (linker)
problem (I'm using binutils-2.20.51.0.7-6.fc14.x86_64).

??


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
  2011-03-02 19:04 ` [Bug c++/47952] " aldyh at gcc dot gnu.org
@ 2011-03-07 15:32 ` aldyh at gcc dot gnu.org
  2011-03-07 15:37 ` aldyh at gcc dot gnu.org
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: aldyh at gcc dot gnu.org @ 2011-03-07 15:32 UTC (permalink / raw)
  To: gcc-bugs

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

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #23513|0                           |1
        is obsolete|                            |

--- Comment #2 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2011-03-07 15:32:09 UTC ---
Created attachment 23571
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23571
assembly with undefined references in clone table

This is the assembly file that has the following undefined references:

src/Game.o:(.tm_clone_table+0x108): undefined reference to `transaction clone
for std::_List_iterator<Building*>::_List_iterator(std::_List_node_base*)'
src/Game.o:(.tm_clone_table+0x258): undefined reference to `transaction clone
for
std::_List_iterator<Game::BuildProject>::_List_iterator(std::_List_node_base*)'

The 2nd reference is the following mangled symbol:

_ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC1EPSt15_List_node_base


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
  2011-03-02 19:04 ` [Bug c++/47952] " aldyh at gcc dot gnu.org
  2011-03-07 15:32 ` aldyh at gcc dot gnu.org
@ 2011-03-07 15:37 ` aldyh at gcc dot gnu.org
  2011-03-08  0:32 ` rth at gcc dot gnu.org
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: aldyh at gcc dot gnu.org @ 2011-03-07 15:37 UTC (permalink / raw)
  To: gcc-bugs

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

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2011-03-07 15:37:06 UTC ---
[These notes are from a question via email to Jakub/Richard.  Saving here to
keep everything in one place.  Still awaiting response.]

In this PR we have an undefined reference to symbol
"_ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC1EPSt15_List_node_base" (see
full .s in attachment). This symbol is only used in the .tm_clone_table:

 .section .tm_clone_table,"aw",@progbits
[...]
 .quad _ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC1EPSt15_List_node_base
[...]

However, the symbol seems to be an alias to another symbol (which is used):

.globl _ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC1EPSt15_List_node_base
        .set
_ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC1EPSt15_List_node_base,
_ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC2EPSt15_List_node_base

Notice these are constructor variants (C1 versus C2 in the mangling).

The original symbol is defined like this:

        .section
.text._ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC2EPSt15_List_node_base,"axG",@progbits,_ZNSt14_List_iteratorIN4Game12BuildProjectEEC5EPSt15_List_node_base,comdat
        .align 2
        .weak
_ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC2EPSt15_List_node_base
        .type
_ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC2EPSt15_List_node_base,
@function
_ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC2EPSt15_List_node_base:
[...]
[...]

This is a wild guess, but should we avoid dumping symbols in the
.tm_clone_table if the original function was a weak symbol?  The one-liner
below, fixes the undefined reference at hand, as well as a myriad of other
linking problems in the Glob2 benchmark.

??

Index: varasm.c
===================================================================
--- varasm.c    (revision 170622)
+++ varasm.c    (working copy)
@@ -5867,6 +5867,9 @@ finish_tm_clone_pairs_1 (void **slot, vo
   if (!src_n->needed)
     return 1;

+  if (DECL_WEAK (src_n->decl))
+    return 1;
+
   if (!*switched)
     {
       switch_to_section (get_named_section (NULL, ".tm_clone_table", 3));


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
                   ` (2 preceding siblings ...)
  2011-03-07 15:37 ` aldyh at gcc dot gnu.org
@ 2011-03-08  0:32 ` rth at gcc dot gnu.org
  2011-03-08  0:39 ` rth at gcc dot gnu.org
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rth at gcc dot gnu.org @ 2011-03-08  0:32 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Henderson <rth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED
         AssignedTo|unassigned at gcc dot       |rth at gcc dot gnu.org
                   |gnu.org                     |


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
                   ` (3 preceding siblings ...)
  2011-03-08  0:32 ` rth at gcc dot gnu.org
@ 2011-03-08  0:39 ` rth at gcc dot gnu.org
  2011-03-08  0:45 ` rth at gcc dot gnu.org
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rth at gcc dot gnu.org @ 2011-03-08  0:39 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Henderson <rth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING

--- Comment #4 from Richard Henderson <rth at gcc dot gnu.org> 2011-03-08 00:39:15 UTC ---
Patrick, I suspect that something like your DECL_COMDAT thing is needed,
but can you please attach a real test case here?  From the comments it
looks like you passed the test case to Aldy off-line?


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
                   ` (4 preceding siblings ...)
  2011-03-08  0:39 ` rth at gcc dot gnu.org
@ 2011-03-08  0:45 ` rth at gcc dot gnu.org
  2011-03-08 10:18 ` patrick.marlier at gmail dot com
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rth at gcc dot gnu.org @ 2011-03-08  0:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Henderson <rth at gcc dot gnu.org> 2011-03-08 00:44:41 UTC ---
Author: rth
Date: Tue Mar  8 00:44:37 2011
New Revision: 170768

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170768
Log:
        PR 47952
        * trans-mem.c (tm_mangle): Pass in and return an identifier.
        (ipa_tm_create_version): Update to match.  Also mangle the
        DECL_COMDAT_GROUP.

Modified:
    branches/transactional-memory/gcc/ChangeLog.tm
    branches/transactional-memory/gcc/trans-mem.c


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
                   ` (5 preceding siblings ...)
  2011-03-08  0:45 ` rth at gcc dot gnu.org
@ 2011-03-08 10:18 ` patrick.marlier at gmail dot com
  2011-03-08 20:02 ` rth at gcc dot gnu.org
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: patrick.marlier at gmail dot com @ 2011-03-08 10:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Patrick Marlier <patrick.marlier at gmail dot com> 2011-03-08 10:17:58 UTC ---
Created attachment 23582
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23582
testcase from glob2.

With the committed patch and this attached testcase, we get this

.text._ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC2EPSt15_List_node_base,"axG",@progbits,_ZGTt67_ZNSt14_List_iteratorIN4Game12BuildProjectEEC5EPSt15_List_node_base,comdat

instead of

.text._ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC2EPSt15_List_node_base,"axG",@progbits,_ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC5EPSt15_List_node_base,comdat

Patrick Marlier.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
                   ` (6 preceding siblings ...)
  2011-03-08 10:18 ` patrick.marlier at gmail dot com
@ 2011-03-08 20:02 ` rth at gcc dot gnu.org
  2011-03-08 22:27 ` rth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rth at gcc dot gnu.org @ 2011-03-08 20:02 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Henderson <rth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
                   ` (7 preceding siblings ...)
  2011-03-08 20:02 ` rth at gcc dot gnu.org
@ 2011-03-08 22:27 ` rth at gcc dot gnu.org
  2011-03-09 12:41 ` aldyh at gcc dot gnu.org
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rth at gcc dot gnu.org @ 2011-03-08 22:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Richard Henderson <rth at gcc dot gnu.org> 2011-03-08 22:27:31 UTC ---
The name isn't being properly demangled.  Although this ought not
matter for correctness; what matters is that the group name is
consistent across all uses, and that functions that are not 
related are not grouped together.  I'll still see about fixing
the demangler such that the group name is handled.

Can you please point me at the full test, so that I can see the
linker errors?


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
                   ` (8 preceding siblings ...)
  2011-03-08 22:27 ` rth at gcc dot gnu.org
@ 2011-03-09 12:41 ` aldyh at gcc dot gnu.org
  2011-03-09 21:15 ` rth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: aldyh at gcc dot gnu.org @ 2011-03-09 12:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2011-03-09 12:41:11 UTC ---
Unless Patrick has reduced the test case, the only way I was able to reproduce
it was to build the entire Glob2 benchmark which he mentions.  It has lots of
dependencies, but is really easy to reproduce.

The dependencies are scons, libboost, SDL, OpenGL, speex, vorbis, ogg, ...  All
are yum installable from fedora.

To reproduce you must do:

$ scons COMPILER=GCC SYNC=FINETM

You can download the application here:
http://members.unine.ch/patrick.marlier/downloads/glob2.tar.bz2


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
                   ` (9 preceding siblings ...)
  2011-03-09 12:41 ` aldyh at gcc dot gnu.org
@ 2011-03-09 21:15 ` rth at gcc dot gnu.org
  2011-03-09 23:02 ` rth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rth at gcc dot gnu.org @ 2011-03-09 21:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Richard Henderson <rth at gcc dot gnu.org> 2011-03-09 21:14:51 UTC ---
Author: rth
Date: Wed Mar  9 21:14:45 2011
New Revision: 170836

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170836
Log:
PR 47952
include/
    * demangle.h (enum gnu_v3_ctor_kinds): Add gnu_v3_object_ctor_group.
    (enum gnu_v3_dtor_kinds): Add gnu_v3_object_dtor_group.
libiberty/
    * cp-demangle.c (cplus_demangle_fill_ctor): Accept
    gnu_v3_object_ctor_group.
    (cplus_demangle_fill_dtor): Accept gnu_v3_object_dtor_group.
    (d_ctor_dtor_name): Recognize gnu_v3_object_ctor_group
    and gnu_v3_object_dtor_group.

Modified:
    branches/transactional-memory/include/ChangeLog.tm
    branches/transactional-memory/include/demangle.h
    branches/transactional-memory/libiberty/ChangeLog.tm
    branches/transactional-memory/libiberty/cp-demangle.c


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
                   ` (10 preceding siblings ...)
  2011-03-09 21:15 ` rth at gcc dot gnu.org
@ 2011-03-09 23:02 ` rth at gcc dot gnu.org
  2011-03-10  4:31 ` patrick.marlier at gmail dot com
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rth at gcc dot gnu.org @ 2011-03-09 23:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Richard Henderson <rth at gcc dot gnu.org> 2011-03-09 23:01:38 UTC ---
The remaining problem in the full glob2 test is


src/Unit.o: In function `transaction clone for Unit::~Unit()':
Unit.cpp:(.text._ZGTtN4UnitD2Ev[transaction clone for Unit::~Unit()]+0x2c):
undefined reference to `transaction clone for std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::~basic_string()'
collect2: ld returned 1 exit status


which really really doesn't exist.  No amount of marking this
function weak is going to work.

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.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
                   ` (11 preceding siblings ...)
  2011-03-09 23:02 ` rth at gcc dot gnu.org
@ 2011-03-10  4:31 ` patrick.marlier at gmail dot com
  2011-03-10 14:19 ` patrick.marlier at gmail dot com
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: patrick.marlier at gmail dot com @ 2011-03-10  4:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Patrick Marlier <patrick.marlier at gmail dot com> 2011-03-10 04:31:30 UTC ---
This issue has been filled here:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48021

There is also a reduced testcase. (If I remember well the namespace std
matters).

Patrick.
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48021>

On Thu, Mar 10, 2011 at 12:01 AM, rth at gcc dot gnu.org <
gcc-bugzilla@gcc.gnu.org> wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47952
>
> --- Comment #10 from Richard Henderson <rth at gcc dot gnu.org> 2011-03-09
> 23:01:38 UTC ---
> The remaining problem in the full glob2 test is
>
>
> src/Unit.o: In function `transaction clone for Unit::~Unit()':
> Unit.cpp:(.text._ZGTtN4UnitD2Ev[transaction clone for Unit::~Unit()]+0x2c):
> undefined reference to `transaction clone for std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >::~basic_string()'
> collect2: ld returned 1 exit status
>
>
> which really really doesn't exist.  No amount of marking this
> function weak is going to work.
>
> 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.
>
> --
> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug.
>


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
                   ` (12 preceding siblings ...)
  2011-03-10  4:31 ` patrick.marlier at gmail dot com
@ 2011-03-10 14:19 ` patrick.marlier at gmail dot com
  2011-03-10 23:04 ` rth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: patrick.marlier at gmail dot com @ 2011-03-10 14:19 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
                   ` (13 preceding siblings ...)
  2011-03-10 14:19 ` patrick.marlier at gmail dot com
@ 2011-03-10 23:04 ` rth at gcc dot gnu.org
  2011-03-10 23:42 ` rth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rth at gcc dot gnu.org @ 2011-03-10 23:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Richard Henderson <rth at gcc dot gnu.org> 2011-03-10 23:04:11 UTC ---
Author: rth
Date: Thu Mar 10 23:04:05 2011
New Revision: 170854

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170854
Log:
PR 47952
    * trans-mem.c (ipa_tm_create_version): Remap extern inline
    functions to static inline clones.

Modified:
    branches/transactional-memory/gcc/ChangeLog.tm
    branches/transactional-memory/gcc/trans-mem.c


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
                   ` (14 preceding siblings ...)
  2011-03-10 23:04 ` rth at gcc dot gnu.org
@ 2011-03-10 23:42 ` rth at gcc dot gnu.org
  2011-03-10 23:46 ` rth at gcc dot gnu.org
  2011-03-10 23:46 ` rth at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: rth at gcc dot gnu.org @ 2011-03-10 23:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Richard Henderson <rth at gcc dot gnu.org> 2011-03-10 23:42:10 UTC ---
*** Bug 48021 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
                   ` (16 preceding siblings ...)
  2011-03-10 23:46 ` rth at gcc dot gnu.org
@ 2011-03-10 23:46 ` rth at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: rth at gcc dot gnu.org @ 2011-03-10 23:46 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Henderson <rth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #16 from Richard Henderson <rth at gcc dot gnu.org> 2011-03-10 23:46:38 UTC ---
Fixed, as far as I can tell.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/47952] [trans-mem] undefined reference to transaction clone
  2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
                   ` (15 preceding siblings ...)
  2011-03-10 23:42 ` rth at gcc dot gnu.org
@ 2011-03-10 23:46 ` rth at gcc dot gnu.org
  2011-03-10 23:46 ` rth at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: rth at gcc dot gnu.org @ 2011-03-10 23:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Richard Henderson <rth at gcc dot gnu.org> 2011-03-10 23:45:53 UTC ---
(In reply to comment #12)
> Should I fill a new PR for this even if I don't have any real testcase?

Yes please.


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2011-03-10 23:46 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-02 12:31 [Bug c++/47952] New: [trans-mem] undefined reference to transaction clone patrick.marlier at gmail dot com
2011-03-02 19:04 ` [Bug c++/47952] " aldyh at gcc dot gnu.org
2011-03-07 15:32 ` aldyh at gcc dot gnu.org
2011-03-07 15:37 ` aldyh at gcc dot gnu.org
2011-03-08  0:32 ` rth at gcc dot gnu.org
2011-03-08  0:39 ` rth at gcc dot gnu.org
2011-03-08  0:45 ` rth at gcc dot gnu.org
2011-03-08 10:18 ` patrick.marlier at gmail dot com
2011-03-08 20:02 ` rth at gcc dot gnu.org
2011-03-08 22:27 ` rth at gcc dot gnu.org
2011-03-09 12:41 ` aldyh at gcc dot gnu.org
2011-03-09 21:15 ` rth at gcc dot gnu.org
2011-03-09 23:02 ` rth at gcc dot gnu.org
2011-03-10  4:31 ` patrick.marlier at gmail dot com
2011-03-10 14:19 ` patrick.marlier at gmail dot com
2011-03-10 23:04 ` rth at gcc dot gnu.org
2011-03-10 23:42 ` rth at gcc dot gnu.org
2011-03-10 23:46 ` rth at gcc dot gnu.org
2011-03-10 23:46 ` rth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).