public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
@ 2011-10-03 14:24 dominiq at lps dot ens.fr
  2011-10-04 11:05 ` [Bug middle-end/50598] " rguenth at gcc dot gnu.org
                   ` (34 more replies)
  0 siblings, 35 replies; 36+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-10-03 14:24 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50598
           Summary: [4.7 Regression] Undefined symbols: "___emutls_v.*",
                    ... on *-apple-darwin*
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dominiq@lps.ens.fr
                CC: hubicka@gcc.gnu.org
              Host: *-apple-darwin*
            Target: *-apple-darwin*
             Build: *-apple-darwin*


Since revision 179430 (see
http://gcc.gnu.org/ml/gcc-testresults/2011-10/msg00193.html r179421 is OK)
libgomp.c++/pr24455.C and libgomp.fortran/threadprivate4.f90 fail with

FAIL: libgomp.c++/pr24455.C  -O0  (test for excess errors)
Excess errors:
Undefined symbols:
  "___emutls_v.i", referenced from:
      ___emutls_v.i$non_lazy_ptr in ccB25Iow.o
     (maybe you meant: ___emutls_v.i$non_lazy_ptr)
ld: symbol(s) not found


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
@ 2011-10-04 11:05 ` rguenth at gcc dot gnu.org
  2011-10-08 20:34 ` dominiq at lps dot ens.fr
                   ` (33 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-04 11:05 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.0


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
  2011-10-04 11:05 ` [Bug middle-end/50598] " rguenth at gcc dot gnu.org
@ 2011-10-08 20:34 ` dominiq at lps dot ens.fr
  2011-10-08 21:51 ` dominiq at lps dot ens.fr
                   ` (32 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-10-08 20:34 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jh at suse dot cz

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-10-08 20:33:53 UTC ---
Revision 179428 is OK, the failures appear at revision 179429.


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
  2011-10-04 11:05 ` [Bug middle-end/50598] " rguenth at gcc dot gnu.org
  2011-10-08 20:34 ` dominiq at lps dot ens.fr
@ 2011-10-08 21:51 ` dominiq at lps dot ens.fr
  2011-10-10 13:02 ` dominiq at lps dot ens.fr
                   ` (31 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-10-08 21:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-10-08 21:50:37 UTC ---
Reverting the change for gcc/cgraphunit.c in  revision 179429 fixes the pr.


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (2 preceding siblings ...)
  2011-10-08 21:51 ` dominiq at lps dot ens.fr
@ 2011-10-10 13:02 ` dominiq at lps dot ens.fr
  2011-10-10 15:16 ` rguenth at gcc dot gnu.org
                   ` (30 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-10-10 13:02 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ro at CeBiTec dot
                   |                            |Uni-Bielefeld.DE

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-10-10 13:00:54 UTC ---
Same failures on sparc-sun-solaris2.(8|9), i386-pc-solaris2.9, and
alpha-dec-osf5.1b (see
http://gcc.gnu.org/ml/gcc-testresults/2011-10/msg01107.html and
http://gcc.gnu.org/ml/gcc-testresults/2011-10/msg01105.html ).


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (3 preceding siblings ...)
  2011-10-10 13:02 ` dominiq at lps dot ens.fr
@ 2011-10-10 15:16 ` rguenth at gcc dot gnu.org
  2011-10-15 18:36 ` dominiq at lps dot ens.fr
                   ` (29 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-10 15:16 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (4 preceding siblings ...)
  2011-10-10 15:16 ` rguenth at gcc dot gnu.org
@ 2011-10-15 18:36 ` dominiq at lps dot ens.fr
  2011-10-24  9:13 ` iains at gcc dot gnu.org
                   ` (28 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-10-15 18:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-10-15 18:36:00 UTC ---
The difference for the test libgomp.c++/pr24455.C comes from the companion file
libgomp.c++/pr24455-1.C. With gcc/cgraphunit.c in revision 179429 reverted,
pr24455-1.s is

[macbook] f90/bug% cat pr24455-1_rev.s
    .globl ___emutls_v.i
    .data
    .align 5
___emutls_v.i:
    .quad    4
    .quad    4
    .quad    0
    .quad    0
    .constructor
    .destructor
    .align 1
    .subsections_via_symbols

while for trunk it is

[macbook] f90/bug% cat pr24455-1_orig.s
    .constructor
    .destructor
    .align 1
    .subsections_via_symbols


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (5 preceding siblings ...)
  2011-10-15 18:36 ` dominiq at lps dot ens.fr
@ 2011-10-24  9:13 ` iains at gcc dot gnu.org
  2011-10-30 17:19 ` danglin at gcc dot gnu.org
                   ` (27 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: iains at gcc dot gnu.org @ 2011-10-24  9:13 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-10-24
                 CC|                            |iains at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> 2011-10-24 09:12:14 UTC ---
also responsible for a bunch of fails in libstdc++-v3 30_threads/...


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (6 preceding siblings ...)
  2011-10-24  9:13 ` iains at gcc dot gnu.org
@ 2011-10-30 17:19 ` danglin at gcc dot gnu.org
  2011-11-03 18:23 ` iains at gcc dot gnu.org
                   ` (26 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: danglin at gcc dot gnu.org @ 2011-10-30 17:19 UTC (permalink / raw)
  To: gcc-bugs

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

John David Anglin <danglin at gcc dot gnu.org> changed:

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

--- Comment #6 from John David Anglin <danglin at gcc dot gnu.org> 2011-10-30 17:17:57 UTC ---
Same failure on hppa*-*-hpux*.


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (7 preceding siblings ...)
  2011-10-30 17:19 ` danglin at gcc dot gnu.org
@ 2011-11-03 18:23 ` iains at gcc dot gnu.org
  2011-11-04  8:57 ` iains at gcc dot gnu.org
                   ` (25 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: iains at gcc dot gnu.org @ 2011-11-03 18:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Iain Sandoe <iains at gcc dot gnu.org> 2011-11-03 18:22:05 UTC ---
$ more ../gcc-live-trunk/libgomp/testsuite/libgomp.c++/pr24455-1.C 
// { dg-do compile }
// { dg-require-effective-target tls }
extern int i;
#pragma omp threadprivate (i)

int i;

===
if this is compiled with  "-x c "  we get:

$ more pr24455-1.s         .text
__GLOBAL__sub_I_65535_0_pr24455_1.C:
        pushl   %ebx
        subl    $24, %esp
        call    ___x86.get_pc_thunk.bx
L00000000001$pb:
        movl    $0, 12(%esp)
        movl    $4, 8(%esp)
        movl    $4, 4(%esp)
        movl    L___emutls_v.i$non_lazy_ptr-L00000000001$pb(%ebx), %eax
        movl    %eax, (%esp)
        call    ___emutls_register_common
        addl    $24, %esp
        popl    %ebx
        ret
        .mod_init_func
        .align 2
        .long   __GLOBAL__sub_I_65535_0_pr24455_1.C
        .comm   ___emutls_v.i,16,2
        .section __TEXT,__textcoal_nt,coalesced,pure_instructions
        .weak_definition        ___x86.get_pc_thunk.bx
        .private_extern ___x86.get_pc_thunk.bx
___x86.get_pc_thunk.bx:
        movl    (%esp), %ebx
        ret
        .section __IMPORT,__pointers,non_lazy_symbol_pointers
L___emutls_v.i$non_lazy_ptr:
        .indirect_symbol ___emutls_v.i
        .long   0
        .subsections_via_symbols

====

if compiled with g++ we get an empty body (as per comment #4).

the tree-dumps are not very interesting - because the tu shows as empty ...

I'm guessing that somehow g++ is dropping the extern .. which allows the
revised version of cgraphunit to prune the variable .. but I'm not sure how to
go about debugging this at the moment ...


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (8 preceding siblings ...)
  2011-11-03 18:23 ` iains at gcc dot gnu.org
@ 2011-11-04  8:57 ` iains at gcc dot gnu.org
  2011-11-04 10:52 ` iains at gcc dot gnu.org
                   ` (24 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: iains at gcc dot gnu.org @ 2011-11-04  8:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Iain Sandoe <iains at gcc dot gnu.org> 2011-11-04 08:56:36 UTC ---
the following also fails (for both c and c++):

extern __thread int i;

__thread int i;

===
 - producing an empty asm file
===

gcc-4.6 produces:

        .globl ___emutls_v.i
        .data
        .align 2
___emutls_v.i:
        .long   4
        .long   4
        .long   0
        .long   0
       .constructor
        .destructor 
        .align 1
        .subsections_via_symbols

====

I'm wondering if, when the variables are pruned - if they are emutls proxies,
they need to check whether the parent var is prune-able. 

 I looked at tree-emutls.c and it seems that the proxy variable should (in
principle) be inheriting the attributes (including external and public) of the
thread var.   Perhaps they are missed in some update.


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (9 preceding siblings ...)
  2011-11-04  8:57 ` iains at gcc dot gnu.org
@ 2011-11-04 10:52 ` iains at gcc dot gnu.org
  2011-11-09 12:42 ` hubicka at gcc dot gnu.org
                   ` (23 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: iains at gcc dot gnu.org @ 2011-11-04 10:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Iain Sandoe <iains at gcc dot gnu.org> 2011-11-04 10:50:36 UTC ---
in tree-emults:
(gdb) call debug_tree(var->decl)
 <var_decl 0x41da24e0 i
    type <integer_type 0x41d17360 int public SI
        size <integer_cst 0x41d0455c constant 32>
        unit size <integer_cst 0x41d04578 constant 4>
        align 32 symtab 0 alias set -1 canonical type 0x41d17360 precision 32
min <integer_cst 0x41d04850 -2147483648> max <integer_cst 0x41d0486c
2147483647>
        pointer_to_this <pointer_type 0x41d17a80>>
    public static tls-global-dynamic SI file ../tests/common-var.C line 4 col
14 size <integer_cst 0x41d0455c 32> unit size <integer_cst 0x41d04578 4>
    align 32 context <translation_unit_decl 0x41d1fec4 D.1589>
    (mem/c/i:SI (symbol_ref:SI ("i") [flags 0x1412] <var_decl 0x41da24e0 i>) [0
i+0 S4 A32])>

===
(gdb) call debug_tree(cdecl)
 <var_decl 0x41da2660 __emutls_v.i
    type <record_type 0x41da2600 __emutls_object BLK
        size <integer_cst 0x41d04a48 constant 128>
        unit size <integer_cst 0x41d04a64 constant 16>
        align 32 symtab 0 alias set -1 canonical type 0x41da2600
        fields <field_decl 0x41d1233c __size type <integer_type 0x41d173c0
unsigned int>
            unsigned SI file (null) line 0 col 0
            size <integer_cst 0x41d0455c constant 32>
            unit size <integer_cst 0x41d04578 constant 4>
            align 32 offset_align 128
            offset <integer_cst 0x41d04594 constant 0>
            bit offset <integer_cst 0x41d04620 constant 0> context <record_type
0x41da2600 __emutls_object> chain <field_decl 0x41d122e0 __align>>>
    public static ignored BLK file ../tests/common-var.C line 4 col 14 size
<integer_cst 0x41d04a48 128> unit size <integer_cst 0x41d04a64 16>
    align 32 context <translation_unit_decl 0x41d1fec4 D.1589> initial
<constructor 0x41d3ac90>
    (mem/s/c:BLK (symbol_ref:SI ("__emutls_v.i") [flags 0x1402] <var_decl
0x41da2660 __emutls_v.i>) [0 __emutls_v.i+0 S16 A32])>

===

there are a lot of calls to cgraph_remove_unreachable_nodes () ... and it seems
that there are two vnodes:

(gdb) call debug_tree(vnode->decl)
 <var_decl 0x41da2660 __emutls_v.i
    type <record_type 0x41da2600 __emutls_object BLK
        size <integer_cst 0x41d04a48 constant 128>
        unit size <integer_cst 0x41d04a64 constant 16>
        align 32 symtab 0 alias set -1 canonical type 0x41da2600
        fields <field_decl 0x41d1233c __size type <integer_type 0x41d173c0
unsigned int>
            unsigned SI file (null) line 0 col 0
            size <integer_cst 0x41d0455c constant 32>
            unit size <integer_cst 0x41d04578 constant 4>
            align 32 offset_align 128
            offset <integer_cst 0x41d04594 constant 0>
            bit offset <integer_cst 0x41d04620 constant 0> context <record_type
0x41da2600 __emutls_object> chain <field_decl 0x41d122e0 __align>>>
    public static ignored BLK file ../tests/common-var.C line 4 col 14 size
<integer_cst 0x41d04a48 128> unit size <integer_cst 0x41d04a64 16>
    align 32 context <translation_unit_decl 0x41d1fec4 D.1589> initial
<constructor 0x41d3ac90>
    (mem/s/c:BLK (symbol_ref:SI ("__emutls_v.i") [flags 0x1402] <var_decl
0x41da2660 __emutls_v.i>) [0 __emutls_v.i+0 S16 A32])>

(gdb) call debug_tree(vnode->decl)
 <var_decl 0x41da24e0 i
    type <integer_type 0x41d17360 int public SI
        size <integer_cst 0x41d0455c constant 32>
        unit size <integer_cst 0x41d04578 constant 4>
        align 32 symtab 0 alias set -1 canonical type 0x41d17360 precision 32
min <integer_cst 0x41d04850 -2147483648> max <integer_cst 0x41d0486c
2147483647>
        pointer_to_this <pointer_type 0x41d17a80>>
    public static tls-global-dynamic SI file ../tests/common-var.C line 4 col
14 size <integer_cst 0x41d0455c 32> unit size <integer_cst 0x41d04578 4>
    align 32 context <translation_unit_decl 0x41d1fec4 D.1589>
    (mem/c/i:SI (symbol_ref:SI ("i") [flags 0x1412] <var_decl 0x41da24e0 i>) [0
i+0 S4 A32])
    value-expr <var_decl 0x41da2660 __emutls_v.i
        type <record_type 0x41da2600 __emutls_object BLK
            size <integer_cst 0x41d04a48 constant 128>
            unit size <integer_cst 0x41d04a64 constant 16>
            align 32 symtab 0 alias set -1 canonical type 0x41da2600 fields
<field_decl 0x41d1233c __size>>
        public static ignored BLK file ../tests/common-var.C line 4 col 14 size
<integer_cst 0x41d04a48 128> unit size <integer_cst 0x41d04a64 16>
        align 32 context <translation_unit_decl 0x41d1fec4 D.1589> initial
<constructor 0x41d3ac90>
        (mem/s/c:BLK (symbol_ref:SI ("__emutls_v.i") [flags 0x1402] <var_decl
0x41da2660 __emutls_v.i>) [0 __emutls_v.i+0 S16 A32])>>

the second seems to be marked as needed and the first is not.

.. not sure where I'm going with the debugging here .. not familiar with this
part of the system.


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (10 preceding siblings ...)
  2011-11-04 10:52 ` iains at gcc dot gnu.org
@ 2011-11-09 12:42 ` hubicka at gcc dot gnu.org
  2011-11-10 21:03 ` iains at gcc dot gnu.org
                   ` (22 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-11-09 12:42 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot       |hubicka at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #10 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-11-09 12:36:03 UTC ---
trying to reproduce this on x86_64... the confusing thing is that emultls don't
seem to fiddle with aliases in any special way.


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (11 preceding siblings ...)
  2011-11-09 12:42 ` hubicka at gcc dot gnu.org
@ 2011-11-10 21:03 ` iains at gcc dot gnu.org
  2011-11-11 11:32 ` iains at gcc dot gnu.org
                   ` (21 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: iains at gcc dot gnu.org @ 2011-11-10 21:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Iain Sandoe <iains at gcc dot gnu.org> 2011-11-10 20:52:56 UTC ---
(In reply to comment #10)
> trying to reproduce this on x86_64... the confusing thing is that emultls don't
> seem to fiddle with aliases in any special way.

Well, if there's any input I can make .. specific question to answer .. 

The only other thing I could suggest is a binutils emutls target - e.g.
cris-elf (I think that is now building again).  I suspect that this is broken
for all such targets.


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (12 preceding siblings ...)
  2011-11-10 21:03 ` iains at gcc dot gnu.org
@ 2011-11-11 11:32 ` iains at gcc dot gnu.org
  2011-11-11 12:10 ` redi at gcc dot gnu.org
                   ` (20 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: iains at gcc dot gnu.org @ 2011-11-11 11:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Iain Sandoe <iains at gcc dot gnu.org> 2011-11-11 11:21:11 UTC ---
BTW, this now blocks bootstrap on x86 darwin because it causes libitm build to
fail.


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (13 preceding siblings ...)
  2011-11-11 11:32 ` iains at gcc dot gnu.org
@ 2011-11-11 12:10 ` redi at gcc dot gnu.org
  2011-11-13 12:55 ` hubicka at ucw dot cz
                   ` (19 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: redi at gcc dot gnu.org @ 2011-11-11 12:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-11-11 12:00:29 UTC ---
join the --disable-libitm club, needed for a few platforms


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (14 preceding siblings ...)
  2011-11-11 12:10 ` redi at gcc dot gnu.org
@ 2011-11-13 12:55 ` hubicka at ucw dot cz
  2011-11-13 13:00 ` iains at gcc dot gnu.org
                   ` (18 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: hubicka at ucw dot cz @ 2011-11-13 12:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Jan Hubicka <hubicka at ucw dot cz> 2011-11-13 12:41:03 UTC ---
Hi,
I finally debugged this.
It is an ordering issue - emutls adds new variables but
remove_unreachable_functions expects that visibility pass has been run and
externally_visible flag computed.  I will add add_new_variable for backend use
just like cgraph API have.

Honza


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (15 preceding siblings ...)
  2011-11-13 12:55 ` hubicka at ucw dot cz
@ 2011-11-13 13:00 ` iains at gcc dot gnu.org
  2011-11-13 13:07 ` dominiq at lps dot ens.fr
                   ` (17 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: iains at gcc dot gnu.org @ 2011-11-13 13:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Iain Sandoe <iains at gcc dot gnu.org> 2011-11-13 12:51:00 UTC ---
(In reply to comment #14)
> Hi,
> I finally debugged this.

Great! :-)
> It is an ordering issue - emutls adds new variables but
> remove_unreachable_functions expects that visibility pass has been run and
> externally_visible flag computed.  I will add add_new_variable for backend use
> just like cgraph API have.

Just in case I misunderstand your reference to "backend".

I think these vars will only be added by tree-emutls pass.


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (16 preceding siblings ...)
  2011-11-13 13:00 ` iains at gcc dot gnu.org
@ 2011-11-13 13:07 ` dominiq at lps dot ens.fr
  2011-11-13 14:01 ` jh at suse dot de
                   ` (16 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-11-13 13:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-11-13 12:54:11 UTC ---
I have found that reverting the change for gcc/cgraphunit.c in  revision 179429
and doing a simple update is not enough to fix the libstdc++-v3 failures. In
top of that the libstdc++-v3 libraries have to be rebuilt too. The differences
are at least

libstdc++-v3/src/libstdc++-symbols.explist

which does not contain ___emutls_v._ZSt15__once_callable without the revert,
and

libstdc++-v3-mvd/src/mutex.o

[macbook] gcc/build_w% nm x86_64-apple-darwin10.8.0/libstdc++-v3/src/mutex.o
0000000000000080 s EH_frame1
                 U ___emutls_get_address
0000000000000020 D ___emutls_v._ZSt11__once_call
0000000000000000 T ___once_proxy

without the revert and

[macbook] gcc/build_w% nm
x86_64-apple-darwin10.8.0/libstdc++-v3-mvd/src/mutex.o
00000000000000a0 s EH_frame1
                 U ___emutls_get_address
0000000000000040 D ___emutls_v._ZSt11__once_call
0000000000000020 D ___emutls_v._ZSt15__once_callable
0000000000000000 T ___once_proxy

with it.

Is this a missing dependency in the make?


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (17 preceding siblings ...)
  2011-11-13 13:07 ` dominiq at lps dot ens.fr
@ 2011-11-13 14:01 ` jh at suse dot de
  2011-11-14 13:13 ` hubicka at ucw dot cz
                   ` (15 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: jh at suse dot de @ 2011-11-13 14:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from jh at suse dot de 2011-11-13 13:08:12 UTC ---
> Is this a missing dependency in the make?
Makefiles generally do not track changes in your compiler.  You need  
to fully rebuild then.
I am travelling today, but should have patch ready tomorrow.


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (18 preceding siblings ...)
  2011-11-13 14:01 ` jh at suse dot de
@ 2011-11-14 13:13 ` hubicka at ucw dot cz
  2011-11-14 16:22 ` redi at gcc dot gnu.org
                   ` (14 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: hubicka at ucw dot cz @ 2011-11-14 13:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Jan Hubicka <hubicka at ucw dot cz> 2011-11-14 12:18:43 UTC ---
Hi,
coud you please verify that the attached patch solves the problem? 

Thanks,
Honza
Index: cgraph.h
===================================================================
--- cgraph.h    (revision 181310)
+++ cgraph.h    (working copy)
@@ -641,6 +641,7 @@ void debug_varpool_node_set (varpool_nod
 void free_varpool_node_set (varpool_node_set);
 void ipa_discover_readonly_nonaddressable_vars (void);
 bool cgraph_comdat_can_be_unshared_p (struct cgraph_node *);
+bool varpool_externally_visible_p (struct varpool_node *, bool);

 /* In predict.c  */
 bool cgraph_maybe_hot_edge_p (struct cgraph_edge *e);
@@ -681,6 +682,7 @@ bool const_value_known_p (tree);
 bool varpool_for_node_and_aliases (struct varpool_node *,
                            bool (*) (struct varpool_node *, void *),
                        void *, bool);
+void varpool_add_new_variable (tree);

 /* Walk all reachable static variables.  */
 #define FOR_EACH_STATIC_VARIABLE(node) \
Index: tree-emutls.c
===================================================================
--- tree-emutls.c    (revision 181310)
+++ tree-emutls.c    (working copy)
@@ -262,7 +262,7 @@ get_emutls_init_templ_addr (tree decl)
   if (DECL_EXTERNAL (to))
     varpool_node (to);
   else
-    varpool_finalize_decl (to);
+    varpool_add_new_variable (to);
   return build_fold_addr_expr (to);
 }

@@ -334,7 +334,7 @@ new_emutls_decl (tree decl, tree alias_o
   if (DECL_EXTERNAL (to))
     varpool_node (to);
   else if (!alias_of)
-    varpool_finalize_decl (to);
+    varpool_add_new_variable (to);
   else 
     varpool_create_variable_alias (to,
                    varpool_node_for_asm
Index: ipa.c
===================================================================
--- ipa.c    (revision 181310)
+++ ipa.c    (working copy)
@@ -647,7 +647,7 @@ cgraph_externally_visible_p (struct cgra

 /* Return true when variable VNODE should be considered externally visible. 
*/

-static bool
+bool
 varpool_externally_visible_p (struct varpool_node *vnode, bool aliased)
 {
   if (!DECL_COMDAT (vnode->decl) && !TREE_PUBLIC (vnode->decl))
Index: varpool.c
===================================================================
--- varpool.c    (revision 181310)
+++ varpool.c    (working copy)
@@ -414,6 +414,20 @@ varpool_finalize_decl (tree decl)
     varpool_assemble_pending_decls ();
 }

+/* Add the variable DECL to the varpool.
+   Unlike varpool_finalize_decl function is intended to be used
+   by middle end and allows insertion of new variable at arbitrary point
+   of compilation.  */
+void
+varpool_add_new_variable (tree decl)
+{
+  struct varpool_node *node;
+  varpool_finalize_decl (decl);
+  node = varpool_node (decl);
+  if (varpool_externally_visible_p (node, false))
+    node->externally_visible = true;
+}
+
 /* Return variable availability.  See cgraph.h for description of individual
    return values.  */
 enum availability


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (19 preceding siblings ...)
  2011-11-14 13:13 ` hubicka at ucw dot cz
@ 2011-11-14 16:22 ` redi at gcc dot gnu.org
  2011-11-14 16:22 ` dominiq at lps dot ens.fr
                   ` (13 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: redi at gcc dot gnu.org @ 2011-11-14 16:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-11-14 16:14:36 UTC ---
(In reply to comment #19)
> FAIL: 30_threads/thread/native_handle/typesizes.cc execution test

This test should be disabled on darwin (and probably everywhere except
GNU/Linux)


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (20 preceding siblings ...)
  2011-11-14 16:22 ` redi at gcc dot gnu.org
@ 2011-11-14 16:22 ` dominiq at lps dot ens.fr
  2011-11-14 16:50 ` iains at gcc dot gnu.org
                   ` (12 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-11-14 16:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-11-14 16:04:57 UTC ---
> coud you please verify that the attached patch solves the problem?

On x86_64-apple-darwin10, I have only done an update with the patch at revision
181350 (but I have rebuilt libstdc++-v3 and i386/libstdc++-v3 at stage 3;-). I
have tested libgomp and libstdc++-v3 without failures except

FAIL: libgomp.graphite/force-parallel-7.c execution test

and

FAIL: 30_threads/thread/native_handle/typesizes.cc execution test

which are likely unrelated. Full regstrapping scheduled for tonight. Thanks for
the patch.


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (21 preceding siblings ...)
  2011-11-14 16:22 ` dominiq at lps dot ens.fr
@ 2011-11-14 16:50 ` iains at gcc dot gnu.org
  2011-11-14 16:56 ` howarth at nitro dot med.uc.edu
                   ` (11 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: iains at gcc dot gnu.org @ 2011-11-14 16:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #21 from Iain Sandoe <iains at gcc dot gnu.org> 2011-11-14 16:30:09 UTC ---
(In reply to comment #18)

> coud you please verify that the attached patch solves the problem? 

(applied, together with c#15 PR51094)

full regstrap incl. Ada and Java, i686-darwin9 results look good.
whilst I don't see the libgomp fail, we still have some regressions/new fails,
but a quick review of the log files suggests that they are unrelated to emuTLS.

full regstrap incl. Ada and Java, powerpc-darwin9 bootstrap (also together with
c#15 PR51094) is complete, testing underway; looking at the terminal output,
good so far.

thanks.


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (22 preceding siblings ...)
  2011-11-14 16:50 ` iains at gcc dot gnu.org
@ 2011-11-14 16:56 ` howarth at nitro dot med.uc.edu
  2011-11-14 17:09 ` hubicka at ucw dot cz
                   ` (10 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-11-14 16:56 UTC (permalink / raw)
  To: gcc-bugs

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

Jack Howarth <howarth at nitro dot med.uc.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |howarth at nitro dot
                   |                            |med.uc.edu

--- Comment #22 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-11-14 16:46:21 UTC ---
(In reply to comment #18)

Bootstraps on x86_64-apple-darwin11 under Xcode 4.2. Still fails libitm
testsuite due to weakref issues.


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (23 preceding siblings ...)
  2011-11-14 16:56 ` howarth at nitro dot med.uc.edu
@ 2011-11-14 17:09 ` hubicka at ucw dot cz
  2011-11-14 17:57 ` hubicka at gcc dot gnu.org
                   ` (9 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: hubicka at ucw dot cz @ 2011-11-14 17:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #23 from Jan Hubicka <hubicka at ucw dot cz> 2011-11-14 17:02:22 UTC ---
thank you! What kind of weakref issues you see?

Honza


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (24 preceding siblings ...)
  2011-11-14 17:09 ` hubicka at ucw dot cz
@ 2011-11-14 17:57 ` hubicka at gcc dot gnu.org
  2011-11-17 11:45 ` vincenzo.innocente at cern dot ch
                   ` (8 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-11-14 17:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #24 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-11-14 17:32:52 UTC ---
Author: hubicka
Date: Mon Nov 14 17:32:47 2011
New Revision: 181358

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181358
Log:

    PR middle-end/50598
    * cgraph.h (varpool_externally_visible_p): Declare.
    (varpool_add_new_variable): Declare.
    * tree-emultls.c (get_emutls_init_templ_addr,
    new_emutls_decl): Use varpool_add_new_variable.
    * ipa.c (varpool_externally_visible_p): Export.
    * varpool.c (varpool_add_new_variable): New function.

Modified:
    trunk/gcc/ChangeLog


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (25 preceding siblings ...)
  2011-11-14 17:57 ` hubicka at gcc dot gnu.org
@ 2011-11-17 11:45 ` vincenzo.innocente at cern dot ch
  2011-11-18  0:26 ` redi at gcc dot gnu.org
                   ` (7 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2011-11-17 11:45 UTC (permalink / raw)
  To: gcc-bugs

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

vincenzo Innocente <vincenzo.innocente at cern dot ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vincenzo.innocente at cern
                   |                            |dot ch

--- Comment #25 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2011-11-17 11:11:34 UTC ---
confirm solved
cat once.cpp 
#include<mutex>
#include<iostream>

int main() {

  std::once_flag flag;
  std::call_once(flag,[](){std::cout << "hi" << std::endl;});

  return 0;
}
Vincenzos-MacBook-Pro:ExercisesBertinoro09 innocent$ c++ -v
Using built-in specs.
COLLECT_GCC=c++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin11.2.0/4.7.0/lto-wrapper
Target: x86_64-apple-darwin11.2.0
Configured with: ./configure --enable-languages=c,c++,fortran
--disable-multilib --disable-bootstrap --enable-lto -disable-libitm
Thread model: posix
gcc version 4.7.0 20111112 (experimental) (GCC) 
Vincenzos-MacBook-Pro:ExercisesBertinoro09 innocent$ c++ -Ofast -pthread
-std=gnu++11 once.cpp 
Undefined symbols for architecture x86_64:
  "___emutls_v._ZSt15__once_callable", referenced from:
      _main in ccCeliaX.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
Vincenzos-MacBook-Pro:ExercisesBertinoro09 innocent$ c++ -v
Using built-in specs.
COLLECT_GCC=c++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin11.2.0/4.7.0/lto-wrapper
Target: x86_64-apple-darwin11.2.0
Configured with: ./configure --enable-languages=c,c++,fortran
--disable-multilib --disable-bootstrap --enable-lto -disable-libitm
Thread model: posix
gcc version 4.7.0 20111117 (experimental) (GCC) 
Vincenzos-MacBook-Pro:ExercisesBertinoro09 innocent$ c++ -Ofast -pthread
-std=gnu++11 once.cpp


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (26 preceding siblings ...)
  2011-11-17 11:45 ` vincenzo.innocente at cern dot ch
@ 2011-11-18  0:26 ` redi at gcc dot gnu.org
  2011-11-20 12:52 ` dominiq at lps dot ens.fr
                   ` (6 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: redi at gcc dot gnu.org @ 2011-11-18  0:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #26 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-11-18 00:16:48 UTC ---
(In reply to comment #20)
> (In reply to comment #19)
> > FAIL: 30_threads/thread/native_handle/typesizes.cc execution test
> 
> This test should be disabled on darwin (and probably everywhere except
> GNU/Linux)

I've disabled this on darwin


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (27 preceding siblings ...)
  2011-11-18  0:26 ` redi at gcc dot gnu.org
@ 2011-11-20 12:52 ` dominiq at lps dot ens.fr
  2011-11-20 13:02 ` dominiq at lps dot ens.fr
                   ` (5 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-11-20 12:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #27 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-11-20 12:43:05 UTC ---
(In reply to comment #26)
> > > FAIL: 30_threads/thread/native_handle/typesizes.cc execution test
> > 
> > This test should be disabled on darwin (and probably everywhere except
> > GNU/Linux)
>
> I've disabled this on darwin

Thanks.


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (28 preceding siblings ...)
  2011-11-20 12:52 ` dominiq at lps dot ens.fr
@ 2011-11-20 13:02 ` dominiq at lps dot ens.fr
  2011-11-20 14:34 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-11-20 13:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #28 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-11-20 12:50:39 UTC ---
(In reply to comment #25)
> confirm solved
> cat once.cpp 
> #include<iostream>
>
> int main() {
>
>   std::once_flag flag;
>   std::call_once(flag,[](){std::cout << "hi" << std::endl;});
>
>   return 0;
> }
> ...
> Undefined symbols for architecture x86_64:
>   "___emutls_v._ZSt15__once_callable", referenced from:
>       _main in ccCeliaX.o
> ld: symbol(s) not found for architecture x86_64
> ...

I am not sure to understand comment #25: is the pr fixed or is it still failing
for the above test on x86_64-apple-darwin11 (it passes on
x86_64-apple-darwin10)?


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (29 preceding siblings ...)
  2011-11-20 13:02 ` dominiq at lps dot ens.fr
@ 2011-11-20 14:34 ` redi at gcc dot gnu.org
  2011-11-20 15:11 ` vincenzo.innocente at cern dot ch
                   ` (3 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: redi at gcc dot gnu.org @ 2011-11-20 14:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #29 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-11-20 13:46:58 UTC ---
Vincenzo's comment shows the test fail for this version

> gcc version 4.7.0 20111112 (experimental) (GCC) 

But pass for this one:

> gcc version 4.7.0 20111117 (experimental) (GCC)


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (30 preceding siblings ...)
  2011-11-20 14:34 ` redi at gcc dot gnu.org
@ 2011-11-20 15:11 ` vincenzo.innocente at cern dot ch
  2011-11-20 16:37 ` dominiq at lps dot ens.fr
                   ` (2 subsequent siblings)
  34 siblings, 0 replies; 36+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2011-11-20 15:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #30 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2011-11-20 14:20:14 UTC ---
sorry Dominique not to have been clear, Jonathan answer is correct.
For what I'm concerned this specific PR can be closed.

vincenzo


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (31 preceding siblings ...)
  2011-11-20 15:11 ` vincenzo.innocente at cern dot ch
@ 2011-11-20 16:37 ` dominiq at lps dot ens.fr
  2012-10-04  0:58 ` whatmannerofburgeristhis at gmail dot com
  2012-10-04  0:58 ` whatmannerofburgeristhis at gmail dot com
  34 siblings, 0 replies; 36+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-11-20 16:37 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

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

--- Comment #31 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-11-20 15:10:51 UTC ---
> For what I'm concerned this specific PR can be closed.

So closing as fixed.


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (33 preceding siblings ...)
  2012-10-04  0:58 ` whatmannerofburgeristhis at gmail dot com
@ 2012-10-04  0:58 ` whatmannerofburgeristhis at gmail dot com
  34 siblings, 0 replies; 36+ messages in thread
From: whatmannerofburgeristhis at gmail dot com @ 2012-10-04  0:58 UTC (permalink / raw)
  To: gcc-bugs


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

Matt Arsenault <whatmannerofburgeristhis at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |whatmannerofburgeristhis at
                   |                            |gmail dot com

--- Comment #33 from Matt Arsenault <whatmannerofburgeristhis at gmail dot com> 2012-10-04 00:58:37 UTC ---
I'm seeing this problem on 4.7.2 when using c++11 packaged_task. The same code
worked yesterday with 4.7.1 before I updated.


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

* [Bug middle-end/50598] [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin*
  2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
                   ` (32 preceding siblings ...)
  2011-11-20 16:37 ` dominiq at lps dot ens.fr
@ 2012-10-04  0:58 ` whatmannerofburgeristhis at gmail dot com
  2012-10-04  0:58 ` whatmannerofburgeristhis at gmail dot com
  34 siblings, 0 replies; 36+ messages in thread
From: whatmannerofburgeristhis at gmail dot com @ 2012-10-04  0:58 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #32 from Matt Arsenault <whatmannerofburgeristhis at gmail dot com> 2012-10-04 00:57:42 UTC ---
Created attachment 28350
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28350
Test case using packaged_task


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

end of thread, other threads:[~2012-10-04  0:58 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-03 14:24 [Bug middle-end/50598] New: [4.7 Regression] Undefined symbols: "___emutls_v.*", ... on *-apple-darwin* dominiq at lps dot ens.fr
2011-10-04 11:05 ` [Bug middle-end/50598] " rguenth at gcc dot gnu.org
2011-10-08 20:34 ` dominiq at lps dot ens.fr
2011-10-08 21:51 ` dominiq at lps dot ens.fr
2011-10-10 13:02 ` dominiq at lps dot ens.fr
2011-10-10 15:16 ` rguenth at gcc dot gnu.org
2011-10-15 18:36 ` dominiq at lps dot ens.fr
2011-10-24  9:13 ` iains at gcc dot gnu.org
2011-10-30 17:19 ` danglin at gcc dot gnu.org
2011-11-03 18:23 ` iains at gcc dot gnu.org
2011-11-04  8:57 ` iains at gcc dot gnu.org
2011-11-04 10:52 ` iains at gcc dot gnu.org
2011-11-09 12:42 ` hubicka at gcc dot gnu.org
2011-11-10 21:03 ` iains at gcc dot gnu.org
2011-11-11 11:32 ` iains at gcc dot gnu.org
2011-11-11 12:10 ` redi at gcc dot gnu.org
2011-11-13 12:55 ` hubicka at ucw dot cz
2011-11-13 13:00 ` iains at gcc dot gnu.org
2011-11-13 13:07 ` dominiq at lps dot ens.fr
2011-11-13 14:01 ` jh at suse dot de
2011-11-14 13:13 ` hubicka at ucw dot cz
2011-11-14 16:22 ` redi at gcc dot gnu.org
2011-11-14 16:22 ` dominiq at lps dot ens.fr
2011-11-14 16:50 ` iains at gcc dot gnu.org
2011-11-14 16:56 ` howarth at nitro dot med.uc.edu
2011-11-14 17:09 ` hubicka at ucw dot cz
2011-11-14 17:57 ` hubicka at gcc dot gnu.org
2011-11-17 11:45 ` vincenzo.innocente at cern dot ch
2011-11-18  0:26 ` redi at gcc dot gnu.org
2011-11-20 12:52 ` dominiq at lps dot ens.fr
2011-11-20 13:02 ` dominiq at lps dot ens.fr
2011-11-20 14:34 ` redi at gcc dot gnu.org
2011-11-20 15:11 ` vincenzo.innocente at cern dot ch
2011-11-20 16:37 ` dominiq at lps dot ens.fr
2012-10-04  0:58 ` whatmannerofburgeristhis at gmail dot com
2012-10-04  0:58 ` whatmannerofburgeristhis at gmail dot com

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).