public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/43602]  New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
@ 2010-03-31 13:22 howarth at nitro dot med dot uc dot edu
  2010-03-31 13:30 ` [Bug middle-end/43602] " howarth at nitro dot med dot uc dot edu
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-03-31 13:22 UTC (permalink / raw)
  To: gcc-bugs

The commit of...

Author: rguenth
Date: Tue Mar 30 13:10:16 2010
New Revision: 157822

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157822
Log:
2010-03-30  Seongbae Park <seongbae.park@gmail.com>
            Jack Howarth <howarth@bromo.med.uc.edu>

        * tree-profile.c (tree_init_ic_make_global_vars): Make static
        variables TLS.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-profile.c

...resulted in a number of profile related testsuite regressions on darwin.
These are all of the form...

[MacPro:~] howarth%
/sw/src/fink.build/gcc45-4.4.999-20100330/darwin_objdir/gcc/xgcc
-B/sw/src/fink.build/gcc45-4.4.999-20100330/darwin_objdir/gcc/
/sw/src/fink.build/gcc45-4.4.999-20100330/gcc-4.5-20100330/gcc/testsuite/gcc.dg/matrix/transpose-1.c
   -fprofile-generate -O3  -lm   -o
/sw/src/fink.build/gcc45-4.4.999-20100330/darwin_objdir/gcc/testsuite/gcc/transpose-1.x01
Undefined symbols:
  "___emutls_v.__gcov_indirect_call_counters", referenced from:
      _mem_init in cc591Wfh.o
      _main in cc591Wfh.o
      global constructors keyed to 65535_0_transpose_1.c in cc591Wfh.o
  "___emutls_v.__gcov_indirect_call_callee", referenced from:
      _mem_init in cc591Wfh.o
      _mem_init in cc591Wfh.o
      _main in cc591Wfh.o
      _main in cc591Wfh.o
      global constructors keyed to 65535_0_transpose_1.c in cc591Wfh.o
      global constructors keyed to 65535_0_transpose_1.c in cc591Wfh.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Reverting r157822 eliminates these failures. These are surprising since darwin
should now provide all of the additional emutls symbols via a versioned
libgcc_ext shared library.

On x86_64-apple-darwin10, current gcc trunk produces...

[MacPro:darwin_objdir/x86_64-apple-darwin10.3.0/libgcc] howarth% nm
libgcc_s.1.dylib | grep emutls
00013e70 T ___emutls_get_address
00014070 T ___emutls_register_common
00013e20 t _emutls_destroy
00013de0 t _emutls_init
00015100 b _emutls_key
000150a0 d _emutls_mutex
000150fc b _emutls_size

[MacPro:darwin_objdir/x86_64-apple-darwin10.3.0/libgcc] howarth% nm
libgcc_ext.10.5.dylib | grep emutls
00013e70 T ___emutls_get_address
00014070 T ___emutls_register_common

The undefined ___emutls_v.__gcov_indirect_call_counters and
___emutls_v.__gcov_indirect_call_callee symbols occur for the following
permutations...

1) r157820 with r157822 applied (where libgcc is built with only
-DHAVE_CC_TLS).
2) r157822 (where libgcc is built with both -DHAVE_CC_TLS and -DUSE_EMUTLS)
3) r157822 with the following patch applied to invert the logic of that commit
so that neither -DHAVE_CC_TLS  or -DUSE_EMUTLS are used in building libgcc)

Index: libgcc/Makefile.in
===================================================================
--- libgcc/Makefile.in  (revision 157840)
+++ libgcc/Makefile.in  (working copy)
@@ -226,7 +226,7 @@
 # will usually contain -g, so for the moment CFLAGS goes first.  We must
 # include CFLAGS - that's where multilib options live.
 INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
-                 $(INCLUDES) @set_have_cc_tls@ @set_use_emutls@
+                 $(INCLUDES) @set_have_cc_tls@

 MULTIDIR := $(shell $(CC) $(CFLAGS) -print-multi-directory)
 MULTIOSDIR := $(shell $(CC) $(CFLAGS) -print-multi-os-directory)
Index: libgcc/configure.ac
===================================================================
--- libgcc/configure.ac (revision 157840)
+++ libgcc/configure.ac (working copy)
@@ -232,20 +232,13 @@
 # gcc, which can't be used to build executable due to that libgcc
 # is yet to be built here.
 GCC_CHECK_CC_TLS
+GCC_CHECK_EMUTLS
 set_have_cc_tls=
-if test "$enable_tls $gcc_cv_have_cc_tls" = "yes yes"; then
+if test "$enable_tls $gcc_cv_have_cc_tls $gcc_cv_use_emutls" = "yes yes no";
then
   set_have_cc_tls="-DHAVE_CC_TLS"
 fi
 AC_SUBST(set_have_cc_tls)

-# See if we have emulated thread-local storage.
-GCC_CHECK_EMUTLS
-set_use_emutls=
-if test "$enable_tls $gcc_cv_use_emutls" = "yes yes"; then
-  set_use_emutls="-DUSE_EMUTLS"
-fi
-AC_SUBST(set_use_emutls)
-
 # Conditionalize the makefile for this target machine.
 tmake_file_=
 for f in ${tmake_file}


-- 
           Summary: ___emutls_v.__gcov_indirect_call_[counters|callee]
                    undefined on *-*-darwin*
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: howarth at nitro dot med dot uc dot edu
 GCC build triplet: *-*-darwin*
  GCC host triplet: *-*-darwin*
GCC target triplet: *-*-darwin*


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
@ 2010-03-31 13:30 ` howarth at nitro dot med dot uc dot edu
  2010-03-31 13:42 ` howarth at nitro dot med dot uc dot edu
                   ` (22 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-03-31 13:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from howarth at nitro dot med dot uc dot edu  2010-03-31 13:29 -------
The commit of the patch to eliminate race conditions in indirect value
profiling (r157822) hasn't triggered the same profile related testsuite
failures in any other target. This leads to two questions...

1) Does any other target really use emulated tls besides darwin?
2) Is standard tls the same as native tls? In other words, are there really
three forms, (tls, native tls and emulated tls, or just two forms (native) tls
and emulated tls?

I ask because according to...

case ${host} in
i[34567]86-*-linux* | x86_64-*-linux* | \
  i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | \
  i[34567]86-*-gnu*)
        tmake_file="${tmake_file} t-tls"
        ;;
esac

...only those targets are using native tls which would suggest (if there are
only two forms of tls) that targets like powerpc64-*-linux* should be using
emulated tls like darwin and thus be failing the profile testcases now. This
isn't the case.


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
  2010-03-31 13:30 ` [Bug middle-end/43602] " howarth at nitro dot med dot uc dot edu
@ 2010-03-31 13:42 ` howarth at nitro dot med dot uc dot edu
  2010-03-31 14:53 ` howarth at nitro dot med dot uc dot edu
                   ` (21 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-03-31 13:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from howarth at nitro dot med dot uc dot edu  2010-03-31 13:42 -------
Richard Guenther has suggested that these two unresolved symbols need to be
exported. I'll test that this evening.


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
  2010-03-31 13:30 ` [Bug middle-end/43602] " howarth at nitro dot med dot uc dot edu
  2010-03-31 13:42 ` howarth at nitro dot med dot uc dot edu
@ 2010-03-31 14:53 ` howarth at nitro dot med dot uc dot edu
  2010-03-31 15:19 ` howarth at nitro dot med dot uc dot edu
                   ` (20 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-03-31 14:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from howarth at nitro dot med dot uc dot edu  2010-03-31 14:53 -------
Does this change applied to libmudflap (which we don't build on darwin) provide
a template for what we might need to do?

Author: jiez
Date: Fri Jan 23 04:58:03 2009
New Revision: 143583

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143583
Log:
        libmudflap/
        * mf-impl.h (__mf_get_state, __mf_set_state): Don't use
        __thread when TLS support is emulated.
        * mf-hooks3.c (__mf_get_state, __mf_set_state): Likewise.
        * mf-runtime.c (__mf_state_1): Likewise.
        * configure.ac: Use GCC_CHECK_EMUTLS.
        * configure: Regenerate.
        * config.h.in: Regenerate.

        config/
        * tls.m4 (GCC_CHECK_EMUTLS): Define.

Modified:
    trunk/config/ChangeLog
    trunk/config/tls.m4
    trunk/libmudflap/ChangeLog
    trunk/libmudflap/config.h.in
    trunk/libmudflap/configure
    trunk/libmudflap/configure.ac
    trunk/libmudflap/mf-hooks3.c
    trunk/libmudflap/mf-impl.h
    trunk/libmudflap/mf-runtime.c

I noticed they they are opting out of using __thread in a particular case for
emulated TLS. Perhaps this is another instance requiring a similar change. This
was proposed in...

http://gcc.gnu.org/ml/gcc-patches/2009-01/msg00406.html

and discussed in the thread leading up to that post (which terminates the
thread).


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (2 preceding siblings ...)
  2010-03-31 14:53 ` howarth at nitro dot med dot uc dot edu
@ 2010-03-31 15:19 ` howarth at nitro dot med dot uc dot edu
  2010-03-31 15:23 ` howarth at nitro dot med dot uc dot edu
                   ` (19 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-03-31 15:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from howarth at nitro dot med dot uc dot edu  2010-03-31 15:19 -------
If I am reading gcc/configure.ac correctly, darwin shouldn't using TLS in that
part of the build. So perhaps we just need to add a wrapper like...

Index: gcc/tree-profile.c
===================================================================
--- gcc/tree-profile.c  (revision 157868)
+++ gcc/tree-profile.c  (working copy)
@@ -82,7 +82,9 @@
   TREE_PUBLIC (ic_void_ptr_var) = 0;
   DECL_ARTIFICIAL (ic_void_ptr_var) = 1;
   DECL_INITIAL (ic_void_ptr_var) = NULL;
+  #ifdef HAVE_AS_TLS
   DECL_TLS_MODEL (ic_void_ptr_var) = decl_default_tls_model (ic_void_ptr_var);
+  #endif 
   varpool_finalize_decl (ic_void_ptr_var);

   gcov_type_ptr = build_pointer_type (get_gcov_type ());

or do we need more tests for TLS in configure.ac there?


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (3 preceding siblings ...)
  2010-03-31 15:19 ` howarth at nitro dot med dot uc dot edu
@ 2010-03-31 15:23 ` howarth at nitro dot med dot uc dot edu
  2010-03-31 20:21 ` howarth at nitro dot med dot uc dot edu
                   ` (18 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-03-31 15:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from howarth at nitro dot med dot uc dot edu  2010-03-31 15:23 -------
Of course this does beg the question of why other instances of...

DECL_TLS_MODEL ()=decl_default_tls_model ();

...such as...

DECL_TLS_MODEL (v) = decl_default_tls_model (v);

...in gcc/c-parser.c and...

DECL_TLS_MODEL (decl) = decl_default_tls_model (decl);

in gcc/c-decl.c don't trigger undefined symbols on darwin.


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (4 preceding siblings ...)
  2010-03-31 15:23 ` howarth at nitro dot med dot uc dot edu
@ 2010-03-31 20:21 ` howarth at nitro dot med dot uc dot edu
  2010-03-31 20:40 ` dominiq at lps dot ens dot fr
                   ` (17 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-03-31 20:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from howarth at nitro dot med dot uc dot edu  2010-03-31 20:21 -------
Untested patch...

Index: varasm.c
===================================================================
--- varasm.c    (revision 157893)
+++ varasm.c    (working copy)
@@ -332,6 +332,7 @@
       TREE_STATIC (to) = TREE_STATIC (decl);
       TREE_PUBLIC (to) = TREE_PUBLIC (decl);
       DECL_VISIBILITY (to) = DECL_VISIBILITY (decl);
+      DECL_VISIBILITY_SPECIFIED (to) = DECL_VISIBILITY_SPECIFIED (decl);
     }
   else
     TREE_STATIC (to) = 1;
@@ -353,8 +354,8 @@
   struct tree_map *h, in;
   void **loc;

-  if (targetm.have_tls || decl == NULL || decl == error_mark_node
-      || TREE_CODE (decl) != VAR_DECL || ! DECL_THREAD_LOCAL_P (decl))
+  assert (!targetm.have_tls && TREE_CODE (decl) == VAR_DECL
+      && DECL_THREAD_LOCAL_P (decl));
     return decl;

   /* Look up the object in the hash; return the control structure if
@@ -413,6 +414,7 @@
   DECL_COMMON (to) = DECL_COMMON (decl);
   DECL_WEAK (to) = DECL_WEAK (decl);
   DECL_VISIBILITY (to) = DECL_VISIBILITY (decl);
+  DECL_VISIBILITY_SPECIFIED (to) = DECL_VISIBILITY_SPECIFIED (decl);

   return to;
 }
Index: tree-profile.c
===================================================================
--- tree-profile.c      (revision 157893)
+++ tree-profile.c      (working copy)
@@ -79,7 +79,8 @@
                  get_identifier ("__gcov_indirect_call_callee"),
                  ptr_void);
   TREE_STATIC (ic_void_ptr_var) = 1;
-  TREE_PUBLIC (ic_void_ptr_var) = 0;
+  TREE_PUBLIC (ic_void_ptr_var) = 1;
+  DECL_COMMON (ic_void_ptr_var) = 1;
   DECL_ARTIFICIAL (ic_void_ptr_var) = 1;
   DECL_INITIAL (ic_void_ptr_var) = NULL;
   DECL_TLS_MODEL (ic_void_ptr_var) = decl_default_tls_model (ic_void_ptr_var);
@@ -91,7 +92,8 @@
                  get_identifier ("__gcov_indirect_call_counters"),
                  gcov_type_ptr);
   TREE_STATIC (ic_gcov_type_ptr_var) = 1;
-  TREE_PUBLIC (ic_gcov_type_ptr_var) = 0;
+  TREE_PUBLIC (ic_gcov_type_ptr_var) = 1;
+  DECL_COMMON (ic_void_ptr_var) = 1;
   DECL_ARTIFICIAL (ic_gcov_type_ptr_var) = 1;
   DECL_INITIAL (ic_gcov_type_ptr_var) = NULL;
   DECL_TLS_MODEL (ic_gcov_type_ptr_var) = decl_default_tls_model
(ic_gcov_type_ptr_var);


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (5 preceding siblings ...)
  2010-03-31 20:21 ` howarth at nitro dot med dot uc dot edu
@ 2010-03-31 20:40 ` dominiq at lps dot ens dot fr
  2010-03-31 20:55 ` dominiq at lps dot ens dot fr
                   ` (16 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: dominiq at lps dot ens dot fr @ 2010-03-31 20:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dominiq at lps dot ens dot fr  2010-03-31 20:40 -------
> +  assert (!targetm.have_tls && TREE_CODE (decl) == VAR_DECL
> +      && DECL_THREAD_LOCAL_P (decl));

s/assert/gcc_assert/


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (6 preceding siblings ...)
  2010-03-31 20:40 ` dominiq at lps dot ens dot fr
@ 2010-03-31 20:55 ` dominiq at lps dot ens dot fr
  2010-03-31 21:05 ` howarth at nitro dot med dot uc dot edu
                   ` (15 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: dominiq at lps dot ens dot fr @ 2010-03-31 20:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from dominiq at lps dot ens dot fr  2010-03-31 20:54 -------
With the patch in comment #6, I get:

[macbook] f90/bug% gcc45 -fprofile-generate -O3
/opt/gcc/work/gcc/testsuite/gcc.dg/matrix/transpose-1.c
gcc45: Internal error: Segmentation fault (program cc1)

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00007fff5bc00ff8
0x0000000100811f9b in lookup_attribute (attr_name=0x10098a348 "ms_abi",
list=0x141dafbb8) at ../../work/gcc/tree.c:5073
5073    {
(gdb) bt
#0  0x0000000100811f9b in lookup_attribute (attr_name=0x10098a348 "ms_abi",
list=0x141dafbb8) at ../../work/gcc/tree.c:5073
#1  0x000000010087020c in ix86_function_type_abi (fntype=<value temporarily
unavailable, due to optimizations>) at ../../work/gcc/config/i386/i386.c:4816
#2  0x0000000100870a45 in ix86_reg_parm_stack_space (fndecl=<value temporarily
unavailable, due to optimizations>) at ../../work/gcc/config/i386/i386.c:4798
#3  0x0000000100317db4 in expand_call (exp=0x101774288, target=0x0, ignore=0)
at ../../work/gcc/calls.c:2082
#4  0x00000001002fab1e in expand_builtin (exp=0x101774288, target=0x0,
subtarget=0x0, mode=<value temporarily unavailable, due to optimizations>,
ignore=0) at ../../work/gcc/builtins.c:6418
#5  0x0000000100405673 in expand_expr_real_1 (exp=0x101774288, target=<value
temporarily unavailable, due to optimizations>, tmode=VOIDmode,
modifier=EXPAND_NORMAL, alt_rtl=0x0) at ../../work/gcc/expr.c:9251
#6  0x0000000100415092 in expand_expr_real_2 (ops=0x7fff5bc01630, target=<value
temporarily unavailable, due to optimizations>, tmode=DImode,
modifier=EXPAND_NORMAL) at expr.h:558
#7  0x000000010040401f in expand_expr_real_1 (exp=0x101773810, target=<value
temporarily unavailable, due to optimizations>, tmode=DImode,
modifier=EXPAND_NORMAL, alt_rtl=0x0) at ../../work/gcc/expr.c:9650
#8  0x0000000100412127 in expand_expr_addr_expr_1 (exp=<value temporarily
unavailable, due to optimizations>, target=0x0, tmode=DImode,
modifier=EXPAND_NORMAL, as=<value temporarily unavailable, due to
optimizations>) at expr.h:558
#9  0x0000000100405d16 in expand_expr_real_1 (exp=0x101773720, target=<value
temporarily unavailable, due to optimizations>, tmode=DImode,
modifier=EXPAND_NORMAL, alt_rtl=0x0) at ../../work/gcc/expr.c:7007
#10 0x000000010031a656 in expand_call (exp=0x101774240, target=0x0, ignore=0)
at expr.h:564
#11 0x00000001002fab1e in expand_builtin (exp=0x101774240, target=0x0,
subtarget=0x0, mode=<value temporarily unavailable, due to optimizations>,
ignore=0) at ../../work/gcc/builtins.c:6418
#12 0x0000000100405673 in expand_expr_real_1 (exp=0x101774240, target=<value
temporarily unavailable, due to optimizations>, tmode=VOIDmode,
modifier=EXPAND_NORMAL, alt_rtl=0x0) at ../../work/gcc/expr.c:9251
#13 0x0000000100415092 in expand_expr_real_2 (ops=0x7fff5bc01fb0, target=<value
temporarily unavailable, due to optimizations>, tmode=DImode,
modifier=EXPAND_NORMAL) at expr.h:558
#14 0x000000010040401f in expand_expr_real_1 (exp=0x101773780, target=<value
temporarily unavailable, due to optimizations>, tmode=DImode,
modifier=EXPAND_NORMAL, alt_rtl=0x0) at ../../work/gcc/expr.c:9650
#15 0x0000000100412127 in expand_expr_addr_expr_1 (exp=<value temporarily
unavailable, due to optimizations>, target=0x0, tmode=DImode,
modifier=EXPAND_NORMAL, as=<value temporarily unavailable, due to
optimizations>) at expr.h:558
#16 0x0000000100405d16 in expand_expr_real_1 (exp=0x101773690, target=<value
temporarily unavailable, due to optimizations>, tmode=DImode,
modifier=EXPAND_NORMAL, alt_rtl=0x0) at ../../work/gcc/expr.c:7007
#17 0x000000010031a656 in expand_call (exp=0x1017741f8, target=0x0, ignore=0)
at expr.h:564
#18 0x00000001002fab1e in expand_builtin (exp=0x1017741f8, target=0x0,
subtarget=0x0, mode=<value temporarily unavailable, due to optimizations>,
ignore=0) at ../../work/gcc/builtins.c:6418
#19 0x0000000100405673 in expand_expr_real_1 (exp=0x1017741f8, target=<value
temporarily unavailable, due to optimizations>, tmode=VOIDmode,
modifier=EXPAND_NORMAL, alt_rtl=0x0) at ../../work/gcc/expr.c:9251
#20 0x0000000100415092 in expand_expr_real_2 (ops=0x7fff5bc02930, target=<value
temporarily unavailable, due to optimizations>, tmode=DImode,
modifier=EXPAND_NORMAL) at expr.h:558
#21 0x000000010040401f in expand_expr_real_1 (exp=0x1017736f0, target=<value
temporarily unavailable, due to optimizations>, tmode=DImode,
modifier=EXPAND_NORMAL, alt_rtl=0x0) at ../../work/gcc/expr.c:9650
#22 0x0000000100412127 in expand_expr_addr_expr_1 (exp=<value temporarily
unavailable, due to optimizations>, target=0x0, tmode=DImode,
modifier=EXPAND_NORMAL, as=<value temporarily unavailable, due to
optimizations>) at expr.h:558
#23 0x0000000100405d16 in expand_expr_real_1 (exp=0x101773600, target=<value
temporarily unavailable, due to optimizations>, tmode=DImode,
modifier=EXPAND_NORMAL, alt_rtl=0x0) at ../../work/gcc/expr.c:7007
...
and so on
...


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (7 preceding siblings ...)
  2010-03-31 20:55 ` dominiq at lps dot ens dot fr
@ 2010-03-31 21:05 ` howarth at nitro dot med dot uc dot edu
  2010-03-31 23:30 ` howarth at nitro dot med dot uc dot edu
                   ` (14 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-03-31 21:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from howarth at nitro dot med dot uc dot edu  2010-03-31 21:05 -------
What happens if you revert the section...

@@ -353,8 +354,8 @@
   struct tree_map *h, in;
   void **loc;

-  if (targetm.have_tls || decl == NULL || decl == error_mark_node
-      || TREE_CODE (decl) != VAR_DECL || ! DECL_THREAD_LOCAL_P (decl))
+  assert (!targetm.have_tls && TREE_CODE (decl) == VAR_DECL
+      && DECL_THREAD_LOCAL_P (decl));
     return decl;

   /* Look up the object in the hash; return the control structure if


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (8 preceding siblings ...)
  2010-03-31 21:05 ` howarth at nitro dot med dot uc dot edu
@ 2010-03-31 23:30 ` howarth at nitro dot med dot uc dot edu
  2010-03-31 23:52 ` howarth at nitro dot med dot uc dot edu
                   ` (13 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-03-31 23:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from howarth at nitro dot med dot uc dot edu  2010-03-31 23:30 -------
Is it expected that the lines...

/* Add code:
   static gcov* __gcov_indirect_call_counters; // pointer to actual counter
   static void* __gcov_indirect_call_callee; // actual callee address
*/

are commented in tree-profile.c? It is curious that these happen to be the same
two symbols that end up unresolved.


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (9 preceding siblings ...)
  2010-03-31 23:30 ` howarth at nitro dot med dot uc dot edu
@ 2010-03-31 23:52 ` howarth at nitro dot med dot uc dot edu
  2010-04-01  0:55 ` [Bug middle-end/43602] New: " Auser99
                   ` (12 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-03-31 23:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from howarth at nitro dot med dot uc dot edu  2010-03-31 23:51 -------
Those add code comments are from the patch first proposed...

http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00918.html


-- 


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


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

* Re: [Bug middle-end/43602]  New:  ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (10 preceding siblings ...)
  2010-03-31 23:52 ` howarth at nitro dot med dot uc dot edu
@ 2010-04-01  0:55 ` Auser99
  2010-04-01  5:12 ` [Bug middle-end/43602] " howarth at nitro dot med dot uc dot edu
                   ` (11 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: Auser99 @ 2010-04-01  0:55 UTC (permalink / raw)
  To: gcc-bugs


Thanks.

au

http://www.xprad.org/



Bugzilla from gcc-bugzilla@gcc.gnu.org wrote:
> 
> The commit of...
> 
> Author: rguenth
> Date: Tue Mar 30 13:10:16 2010
> New Revision: 157822
> 
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157822
> Log:
> 2010-03-30  Seongbae Park <seongbae.park@gmail.com>
>             Jack Howarth <howarth@bromo.med.uc.edu>
> 
>         * tree-profile.c (tree_init_ic_make_global_vars): Make static
>         variables TLS.
> 
> Modified:
>     trunk/gcc/ChangeLog
>     trunk/gcc/tree-profile.c
> 
> ...resulted in a number of profile related testsuite regressions on
> darwin.
> These are all of the form...
> 
> [MacPro:~] howarth%
> /sw/src/fink.build/gcc45-4.4.999-20100330/darwin_objdir/gcc/xgcc
> -B/sw/src/fink.build/gcc45-4.4.999-20100330/darwin_objdir/gcc/
> /sw/src/fink.build/gcc45-4.4.999-20100330/gcc-4.5-20100330/gcc/testsuite/gcc.dg/matrix/transpose-1.c
>    -fprofile-generate -O3  -lm   -o
> /sw/src/fink.build/gcc45-4.4.999-20100330/darwin_objdir/gcc/testsuite/gcc/transpose-1.x01
> Undefined symbols:
>   "___emutls_v.__gcov_indirect_call_counters", referenced from:
>       _mem_init in cc591Wfh.o
>       _main in cc591Wfh.o
>       global constructors keyed to 65535_0_transpose_1.c in cc591Wfh.o
>   "___emutls_v.__gcov_indirect_call_callee", referenced from:
>       _mem_init in cc591Wfh.o
>       _mem_init in cc591Wfh.o
>       _main in cc591Wfh.o
>       _main in cc591Wfh.o
>       global constructors keyed to 65535_0_transpose_1.c in cc591Wfh.o
>       global constructors keyed to 65535_0_transpose_1.c in cc591Wfh.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> 
> Reverting r157822 eliminates these failures. These are surprising since
> darwin
> should now provide all of the additional emutls symbols via a versioned
> libgcc_ext shared library.
> 
> On x86_64-apple-darwin10, current gcc trunk produces...
> 
> [MacPro:darwin_objdir/x86_64-apple-darwin10.3.0/libgcc] howarth% nm
> libgcc_s.1.dylib | grep emutls
> 00013e70 T ___emutls_get_address
> 00014070 T ___emutls_register_common
> 00013e20 t _emutls_destroy
> 00013de0 t _emutls_init
> 00015100 b _emutls_key
> 000150a0 d _emutls_mutex
> 000150fc b _emutls_size
> 
> [MacPro:darwin_objdir/x86_64-apple-darwin10.3.0/libgcc] howarth% nm
> libgcc_ext.10.5.dylib | grep emutls
> 00013e70 T ___emutls_get_address
> 00014070 T ___emutls_register_common
> 
> The undefined ___emutls_v.__gcov_indirect_call_counters and
> ___emutls_v.__gcov_indirect_call_callee symbols occur for the following
> permutations...
> 
> 1) r157820 with r157822 applied (where libgcc is built with only
> -DHAVE_CC_TLS).
> 2) r157822 (where libgcc is built with both -DHAVE_CC_TLS and
> -DUSE_EMUTLS)
> 3) r157822 with the following patch applied to invert the logic of that
> commit
> so that neither -DHAVE_CC_TLS  or -DUSE_EMUTLS are used in building
> libgcc)
> 
> Index: libgcc/Makefile.in
> ===================================================================
> --- libgcc/Makefile.in  (revision 157840)
> +++ libgcc/Makefile.in  (working copy)
> @@ -226,7 +226,7 @@
>  # will usually contain -g, so for the moment CFLAGS goes first.  We must
>  # include CFLAGS - that's where multilib options live.
>  INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
> -                 $(INCLUDES) @set_have_cc_tls@ @set_use_emutls@
> +                 $(INCLUDES) @set_have_cc_tls@
> 
>  MULTIDIR := $(shell $(CC) $(CFLAGS) -print-multi-directory)
>  MULTIOSDIR := $(shell $(CC) $(CFLAGS) -print-multi-os-directory)
> Index: libgcc/configure.ac
> ===================================================================
> --- libgcc/configure.ac (revision 157840)
> +++ libgcc/configure.ac (working copy)
> @@ -232,20 +232,13 @@
>  # gcc, which can't be used to build executable due to that libgcc
>  # is yet to be built here.
>  GCC_CHECK_CC_TLS
> +GCC_CHECK_EMUTLS
>  set_have_cc_tls=
> -if test "$enable_tls $gcc_cv_have_cc_tls" = "yes yes"; then
> +if test "$enable_tls $gcc_cv_have_cc_tls $gcc_cv_use_emutls" = "yes yes
> no";
> then
>    set_have_cc_tls="-DHAVE_CC_TLS"
>  fi
>  AC_SUBST(set_have_cc_tls)
> 
> -# See if we have emulated thread-local storage.
> -GCC_CHECK_EMUTLS
> -set_use_emutls=
> -if test "$enable_tls $gcc_cv_use_emutls" = "yes yes"; then
> -  set_use_emutls="-DUSE_EMUTLS"
> -fi
> -AC_SUBST(set_use_emutls)
> -
>  # Conditionalize the makefile for this target machine.
>  tmake_file_=
>  for f in ${tmake_file}
> 
> 
> -- 
>            Summary: ___emutls_v.__gcov_indirect_call_[counters|callee]
>                     undefined on *-*-darwin*
>            Product: gcc
>            Version: 4.5.0
>             Status: UNCONFIRMED
>           Severity: normal
>           Priority: P3
>          Component: middle-end
>         AssignedTo: unassigned at gcc dot gnu dot org
>         ReportedBy: howarth at nitro dot med dot uc dot edu
>  GCC build triplet: *-*-darwin*
>   GCC host triplet: *-*-darwin*
> GCC target triplet: *-*-darwin*
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43602
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/-Bug-middle-end-43602---New%3A-___emutls_v.__gcov_indirect_call_-counters%7Ccallee--undefined-on-*-*-darwin*-tp28095803p28103457.html
Sent from the gcc - bugs mailing list archive at Nabble.com.


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (11 preceding siblings ...)
  2010-04-01  0:55 ` [Bug middle-end/43602] New: " Auser99
@ 2010-04-01  5:12 ` howarth at nitro dot med dot uc dot edu
  2010-04-01  5:13 ` howarth at nitro dot med dot uc dot edu
                   ` (10 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-04-01  5:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from howarth at nitro dot med dot uc dot edu  2010-04-01 05:11 -------
Proposed patch posted to
http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00005.html.


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (12 preceding siblings ...)
  2010-04-01  5:12 ` [Bug middle-end/43602] " howarth at nitro dot med dot uc dot edu
@ 2010-04-01  5:13 ` howarth at nitro dot med dot uc dot edu
  2010-04-01 11:28 ` howarth at nitro dot med dot uc dot edu
                   ` (9 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-04-01  5:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from howarth at nitro dot med dot uc dot edu  2010-04-01 05:13 -------
Created an attachment (id=20268)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20268&action=view)
proposed patch to fix visibility issues on darwin


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (13 preceding siblings ...)
  2010-04-01  5:13 ` howarth at nitro dot med dot uc dot edu
@ 2010-04-01 11:28 ` howarth at nitro dot med dot uc dot edu
  2010-04-01 13:25 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-04-01 11:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from howarth at nitro dot med dot uc dot edu  2010-04-01 11:27 -------
Reverting back to...

TREE_PUBLIC (ic_void_ptr_var) = 0;

in the proposed patch results in the missing symbols again.
Can we just leave...

TREE_PUBLIC (ic_void_ptr_var) = 1;

and find some way to coalesce the symbols so that the failure in...

FAIL: gcc.dg/tree-prof/ic-misattribution-1.c compilation,  -fprofile-generate
-D_PROFILE_GENERATE

disappears. Lastly, any chance we can change this to a P1 so that it is fixed
before the gcc 4.5 release?


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (14 preceding siblings ...)
  2010-04-01 11:28 ` howarth at nitro dot med dot uc dot edu
@ 2010-04-01 13:25 ` rguenth at gcc dot gnu dot org
  2010-04-01 13:26 ` rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-01 13:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from rguenth at gcc dot gnu dot org  2010-04-01 13:25 -------
Subject: Bug 43602

Author: rguenth
Date: Thu Apr  1 13:24:58 2010
New Revision: 157907

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157907
Log:
2010-04-01  Richard Guenther  <rguenther@suse.de>

        PR middle-end/43602
        Revert
        2010-03-30  Seongbae Park <seongbae.park@gmail.com>
            Jack Howarth <howarth@bromo.med.uc.edu>

        * tree-profile.c (tree_init_ic_make_global_vars): Make static
        variables TLS.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-profile.c


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (15 preceding siblings ...)
  2010-04-01 13:25 ` rguenth at gcc dot gnu dot org
@ 2010-04-01 13:26 ` rguenth at gcc dot gnu dot org
  2010-04-01 15:42 ` bonzini at gnu dot org
                   ` (6 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-01 13:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from rguenth at gcc dot gnu dot org  2010-04-01 13:26 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (16 preceding siblings ...)
  2010-04-01 13:26 ` rguenth at gcc dot gnu dot org
@ 2010-04-01 15:42 ` bonzini at gnu dot org
  2010-04-01 16:00 ` howarth at nitro dot med dot uc dot edu
                   ` (5 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: bonzini at gnu dot org @ 2010-04-01 15:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from bonzini at gnu dot org  2010-04-01 15:42 -------
Subject: Re:  ___emutls_v.__gcov_indirect_call_[counters|callee]
 undefined on *-*-darwin*

On 04/01/2010 01:27 PM, howarth at nitro dot med dot uc dot edu wrote:
> ------- Comment #14 from howarth at nitro dot med dot uc dot edu  2010-04-01 11:27 -------
> Reverting back to...
>
> TREE_PUBLIC (ic_void_ptr_var) = 0;
>
> in the proposed patch results in the missing symbols again.
> Can we just leave...
>
> TREE_PUBLIC (ic_void_ptr_var) = 1;

No, I don't see how this can be correct.

The symbols must _not_ be coalesced, that's why TREE_PUBLIC is zero.

Paolo


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (17 preceding siblings ...)
  2010-04-01 15:42 ` bonzini at gnu dot org
@ 2010-04-01 16:00 ` howarth at nitro dot med dot uc dot edu
  2010-04-01 16:01 ` bonzini at gnu dot org
                   ` (4 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-04-01 16:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from howarth at nitro dot med dot uc dot edu  2010-04-01 16:00 -------
Paolo,
     Is there any other debug info I can provide (on gcc trunk pre-reversion)
to help debug this issue? Also could you switch an x86_64 linux build of gcc
trunk over to using emutls and try to reproduce it under ELF?
        Jack


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (18 preceding siblings ...)
  2010-04-01 16:00 ` howarth at nitro dot med dot uc dot edu
@ 2010-04-01 16:01 ` bonzini at gnu dot org
  2010-04-05  8:32 ` developer at sandoe-acoustics dot co dot uk
                   ` (3 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: bonzini at gnu dot org @ 2010-04-01 16:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from bonzini at gnu dot org  2010-04-01 16:01 -------
No, I don't have time to debug this further, sorry.


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (19 preceding siblings ...)
  2010-04-01 16:01 ` bonzini at gnu dot org
@ 2010-04-05  8:32 ` developer at sandoe-acoustics dot co dot uk
  2010-05-15 15:40 ` iains at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: developer at sandoe-acoustics dot co dot uk @ 2010-04-05  8:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from developer at sandoe-acoustics dot co dot uk  2010-04-05 08:32 -------
see:
http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00129.html


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (20 preceding siblings ...)
  2010-04-05  8:32 ` developer at sandoe-acoustics dot co dot uk
@ 2010-05-15 15:40 ` iains at gcc dot gnu dot org
  2010-05-19 14:54 ` iains at gcc dot gnu dot org
  2010-05-24 14:37 ` iains at gcc dot gnu dot org
  23 siblings, 0 replies; 25+ messages in thread
From: iains at gcc dot gnu dot org @ 2010-05-15 15:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #21 from iains at gcc dot gnu dot org  2010-05-15 15:40 -------
updated:
http://gcc.gnu.org/ml/gcc-patches/2010-05/msg01119.html


-- 


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (21 preceding siblings ...)
  2010-05-15 15:40 ` iains at gcc dot gnu dot org
@ 2010-05-19 14:54 ` iains at gcc dot gnu dot org
  2010-05-24 14:37 ` iains at gcc dot gnu dot org
  23 siblings, 0 replies; 25+ messages in thread
From: iains at gcc dot gnu dot org @ 2010-05-19 14:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #22 from iains at gcc dot gnu dot org  2010-05-19 14:54 -------
I would imagine that this will ultimately affect all EMUTLS targets even tho
it's against darwin.

tree-profile.c is generating gimple directly  for the inserted statements -
AFAICT it's assuming that these don't need further expansion/gimplification...

We need to substitute a reference and call for each emutls var ref. so that
needs to be stuffed in and gimplified.. 

on my TODO if unless someone gets there first .. 


-- 

iains at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|developer at sandoe-        |iains at gcc dot gnu dot org
                   |acoustics dot co dot uk     |


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


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

* [Bug middle-end/43602] ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
  2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
                   ` (22 preceding siblings ...)
  2010-05-19 14:54 ` iains at gcc dot gnu dot org
@ 2010-05-24 14:37 ` iains at gcc dot gnu dot org
  23 siblings, 0 replies; 25+ messages in thread
From: iains at gcc dot gnu dot org @ 2010-05-24 14:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #23 from iains at gcc dot gnu dot org  2010-05-24 14:36 -------
Subject: Bug 43602

Author: iains
Date: Mon May 24 14:36:32 2010
New Revision: 159781

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159781
Log:
2010-05-24  Iain Sandoe  <iains@gcc.gnu.org>

        PR target/44132
        PR middle-end/43602
        * varasm.c (get_emutls_init_templ_addr): Copy DECL_PRESERVE_P,
        DECL_VISIBILITY_SPECIFIED.
        (emutls_decl): Set DECL_PRESERVE_P and copy
        DECL_VISIBILITY_SPECIFIED, DECL_RESTRICTED_P.
        (emutls_finalize_control_var): New callback.
        (emutls_finish): Finalize emutls control variables.
        * toplev.c (compile_file): Move the call to emutls_finish () 
        before varpool_assemble_pending_decls ().


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/toplev.c
    trunk/gcc/varasm.c


-- 


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


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

end of thread, other threads:[~2010-05-24 14:37 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
2010-03-31 13:30 ` [Bug middle-end/43602] " howarth at nitro dot med dot uc dot edu
2010-03-31 13:42 ` howarth at nitro dot med dot uc dot edu
2010-03-31 14:53 ` howarth at nitro dot med dot uc dot edu
2010-03-31 15:19 ` howarth at nitro dot med dot uc dot edu
2010-03-31 15:23 ` howarth at nitro dot med dot uc dot edu
2010-03-31 20:21 ` howarth at nitro dot med dot uc dot edu
2010-03-31 20:40 ` dominiq at lps dot ens dot fr
2010-03-31 20:55 ` dominiq at lps dot ens dot fr
2010-03-31 21:05 ` howarth at nitro dot med dot uc dot edu
2010-03-31 23:30 ` howarth at nitro dot med dot uc dot edu
2010-03-31 23:52 ` howarth at nitro dot med dot uc dot edu
2010-04-01  0:55 ` [Bug middle-end/43602] New: " Auser99
2010-04-01  5:12 ` [Bug middle-end/43602] " howarth at nitro dot med dot uc dot edu
2010-04-01  5:13 ` howarth at nitro dot med dot uc dot edu
2010-04-01 11:28 ` howarth at nitro dot med dot uc dot edu
2010-04-01 13:25 ` rguenth at gcc dot gnu dot org
2010-04-01 13:26 ` rguenth at gcc dot gnu dot org
2010-04-01 15:42 ` bonzini at gnu dot org
2010-04-01 16:00 ` howarth at nitro dot med dot uc dot edu
2010-04-01 16:01 ` bonzini at gnu dot org
2010-04-05  8:32 ` developer at sandoe-acoustics dot co dot uk
2010-05-15 15:40 ` iains at gcc dot gnu dot org
2010-05-19 14:54 ` iains at gcc dot gnu dot org
2010-05-24 14:37 ` iains at gcc dot gnu dot 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).