http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48845
Summary: [4.7 regression] All g++.dg/tree-prof and
gcc.dg/{matrix, tree-prof} executions tests fail on
Solaris 8/9
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: gcov-profile
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Host: *-*-solaris2.[89]
Target: *-*-solaris2.[89]
Build: *-*-solaris2.[89]
Between 20110421 and 20110429, all g++.dg/tree-prof and gcc.dg/{matrix,
tree-prof}
execution tests started to fail on Solaris 8 and 9, both x86 and SPARC:
+FAIL: g++.dg/tree-prof/indir-call-prof-2.C execution, -g
-fprofile-generate
spawn [open ...]
ld.so.1: indir-call-prof-2.x01: fatal:
/var/gcc/regression/trunk/9-gcc-gas/build
/gcc/testsuite/g++/indir-call-prof-2.x01: object requires TLS, but TLS failed
to
initialize
This obviously happens since profiling now uses TLS under the hood:
[5] | 4| 4|TLS |LOCL |0 |9
|__gcov_indirect_call_callee
[6] | 0| 4|TLS |LOCL |0 |9
|__gcov_indirect_call_counters
So it is caused by this patch:
2011-04-27 Xinliang David Li <[email protected]>
* tree-profile.c (init_ic_make_global_vars): Set
tls attribute on ic vars.
* coverage.c (coverage_end_function): Initialize
function_list with zero.
Some platforms require special options for TLS, which is handled by
dg-add-options tls. It seems that all tests in those directories should be
marked
dg-require-effective-target tls_runtime
dg-add-options tls
or rather this should be handled in the .exp files instead.
Rainer