[Bug middle-end/50638] [4.7 Regression] emulated TLS fails

2011-10-11 Thread matz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50638

Michael Matz matz at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jojelino at gmail dot com

--- Comment #14 from Michael Matz matz at gcc dot gnu.org 2011-10-11 11:08:17 
UTC ---
*** Bug 50658 has been marked as a duplicate of this bug. ***


[Bug middle-end/50638] [4.7 Regression] emulated TLS fails

2011-10-10 Thread matz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50638

--- Comment #12 from Michael Matz matz at gcc dot gnu.org 2011-10-10 11:59:33 
UTC ---
Author: matz
Date: Mon Oct 10 11:59:29 2011
New Revision: 179745

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=179745
Log:
PR middle-end/50638
* tree-emutls.c (gen_emutls_addr): Call add_referenced_var.

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


[Bug middle-end/50638] [4.7 Regression] emulated TLS fails

2011-10-10 Thread matz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50638

Michael Matz matz at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #13 from Michael Matz matz at gcc dot gnu.org 2011-10-10 12:54:30 
UTC ---
AFAIK Fixed.


[Bug middle-end/50638] [4.7 Regression] emulated TLS fails

2011-10-08 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50638

--- Comment #11 from Dominique d'Humieres dominiq at lps dot ens.fr 
2011-10-08 10:22:30 UTC ---
On x86_64-apple-darwin10 the patch in
http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00597.html fixes the tls failures
(over a thousand in my tests;-).


[Bug middle-end/50638] [4.7 Regression] emulated TLS fails

2011-10-07 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50638

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |4.7.0

--- Comment #3 from Richard Guenther rguenth at gcc dot gnu.org 2011-10-07 
08:29:41 UTC ---
I suppose emultls needs another add_referenced_var call.


[Bug middle-end/50638] [4.7 Regression] emulated TLS fails

2011-10-07 Thread ro at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50638

Rainer Orth ro at gcc dot gnu.org changed:

   What|Removed |Added

 CC||ro at gcc dot gnu.org

--- Comment #4 from Rainer Orth ro at gcc dot gnu.org 2011-10-07 16:40:09 UTC 
---
The same issue breaks bootstrap on Solaris 8 and 9/x86 (so far, SPARC probably
too) with Sun as in libgo:

/vol/gcc/src/hg/trunk/local/libgo/runtime/go-defer.c: In function '__go_defer':
/vol/gcc/src/hg/trunk/local/libgo/runtime/go-defer.c:16:1: internal compiler
error: Segmentation Fault


[Bug middle-end/50638] [4.7 Regression] emulated TLS fails

2011-10-07 Thread matz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50638

Michael Matz matz at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #5 from Michael Matz matz at gcc dot gnu.org 2011-10-07 16:53:59 
UTC ---
Mine.  See also http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00597.html .
What's the variable that causes the segfault?


[Bug middle-end/50638] [4.7 Regression] emulated TLS fails

2011-10-07 Thread ro at CeBiTec dot Uni-Bielefeld.DE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50638

--- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE ro at CeBiTec dot 
Uni-Bielefeld.DE 2011-10-07 16:58:40 UTC ---
 --- Comment #5 from Michael Matz matz at gcc dot gnu.org 2011-10-07 
 16:53:59 UTC ---
 Mine.  See also http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00597.html .
 What's the variable that causes the segfault?

Program received signal SIGSEGV, Segmentation fault.
set_is_used (tp=0xbf674be4, 
   
Parma_Polyhedra_Library14Grid_Generator11set_divisorERK10__gmp_exprIA1_12__mpz_structS3_E=0x80475fc,
data=0x0)
at /vol/gcc/src/hg/trunk/local/gcc/tree-flow-inline.h:562
562   ann-used = true;
(gdb) where
#0  set_is_used (tp=0xbf674be4, 
   
Parma_Polyhedra_Library14Grid_Generator11set_divisorERK10__gmp_exprIA1_12__mpz_structS3_E=0x80475fc,
data=0x0)
at /vol/gcc/src/hg/trunk/local/gcc/tree-flow-inline.h:562
#1  mark_all_vars_used_1 (tp=0xbf674be4, 
   
Parma_Polyhedra_Library14Grid_Generator11set_divisorERK10__gmp_exprIA1_12__mpz_structS3_E=0x80475fc,
data=0x0)
at /vol/gcc/src/hg/trunk/local/gcc/tree-ssa-live.c:379
#2  0x087b479a in walk_tree_1 (tp=0xbf674be4, 
func=0x868f570 mark_all_vars_used_1, 
ZNK23Parma_Polyhedra_Library6Matrix8num_rowsEv=0x0, pset=0x0, lh=0)
at /vol/gcc/src/hg/trunk/local/gcc/tree.c:10457
#3  0x08690152 in mark_all_vars_used ()
at /vol/gcc/src/hg/trunk/local/gcc/tree-ssa-live.c:595
#4  remove_unused_locals ()
at /vol/gcc/src/hg/trunk/local/gcc/tree-ssa-live.c:727
#5  0x084e8909 in execute_function_todo (
__gmp_exprIA1_12__mpq_structS3_EE6Status10ascii_loadERSi=0x826)
at /vol/gcc/src/hg/trunk/local/gcc/passes.c:1695
#6  0x084e8f44 in mp_exprIA1_12__mpq_structS1_E7set_strEPKci (
_RKNS_17Constraint_SystemEPj=0x84e87b4 execute_function_todo, 
__gmp_exprIA1_12__mpq_structS3_EE6Status10ascii_loadERSi=0x826)
at /vol/gcc/src/hg/trunk/local/gcc/passes.c:1548
#7  0x084e943e in execute_todo (2__mpz_structS7_E=2086)
at /vol/gcc/src/hg/trunk/local/gcc/passes.c:1741
#8  0x084ec2da in execute_one_pass (essionENS_15Relation_SymbolES4_=0x923e6a0)
at /vol/gcc/src/hg/trunk/local/gcc/passes.c:2087
#9  0x084ec601 in execute_pass_list (essionENS_15Relation_SymbolES4_=0x923e6a0)
at /vol/gcc/src/hg/trunk/local/gcc/passes.c:2119
#10 0x084ec614 in execute_pass_list (essionENS_15Relation_SymbolES4_=0x8f6c420)
at /vol/gcc/src/hg/trunk/local/gcc/passes.c:2120
#11 0x084ec614 in execute_pass_list (essionENS_15Relation_SymbolES4_=0x8f6bb20)
at /vol/gcc/src/hg/trunk/local/gcc/passes.c:2120
#12 0x0860d603 in tree_rest_of_compilation (
4NNC_PolyhedronEEESaIS3_EE6removeERKS3_=0xbf638f80)
at /vol/gcc/src/hg/trunk/local/gcc/tree-optimize.c:420
#13 0x082927d3 in cgraph_expand_function (
   
ZN23Parma_Polyhedra_Library3BoxINS_8IntervalI10__gmp_exprIA1_12__mpq_structS4_ENS_25Interval_Restriction_NoneINS_20Interval_Info_BitsetIjNS_29Rational_Interval_Info_Policy24generalized_affine_imageENS_8VariableENS_15Relation_SymbolERKNS_17Linear_ExpressionERKS2_IA1_12__mpz_structSJ_E=0xbf5bf668)
at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:1805
#14 0x08294a15 in Status8test_allEj ()
at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:1864
#15 cgraph_optimize () at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:2141
#16 0x08294e7b in cgraph_finalize_compilation_unit ()
at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:1312
#17 0x08166724 in c_write_global_declarations ()
at /vol/gcc/src/hg/trunk/local/gcc/c-decl.c:9936
#18 0x0859e922 in compile_file (argc=11, argv=0x804794c)
at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:581
#19 do_compile (argc=11, argv=0x804794c)
at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:1925
#20 toplev_main (argc=11, argv=0x804794c)
at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:2001
#21 0x08cacf9b in main (argc=11, argv=0x804794c)
at /vol/gcc/src/hg/trunk/local/gcc/main.c:36
(gdb) up
#1  mark_all_vars_used_1 (tp=0xbf674be4, 
   
Parma_Polyhedra_Library14Grid_Generator11set_divisorERK10__gmp_exprIA1_12__mpz_structS3_E=0x80475fc,
data=0x0)
at /vol/gcc/src/hg/trunk/local/gcc/tree-ssa-live.c:379
379   set_is_used (t);
(gdb) p t
$1 = (tree) 0xbf656e40
(gdb) pt
 var_decl bf656e40 __emutls_v.__go_panic_defer
type record_type bf656de0 __emutls_object BLK
size integer_cst bf5b5a48 constant 128
unit size integer_cst bf5b5a64 constant 16
align 32 symtab 0 alias set -1 canonical type bf656de0
fields field_decl bf64bf74 __size type integer_type bf5c73c0 unsigned
int
unsigned SI file 
Program received signal SIGSEGV, Segmentation fault.
0xbf6dd359 in strlen () from /usr/lib/libc.so.1
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use set unwindonsignal on.
Evaluation of the expression containing the function
(debug_tree(tree_node*)) will be abandoned.
When the function is done executing, GDB 

[Bug middle-end/50638] [4.7 Regression] emulated TLS fails

2011-10-07 Thread matz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50638

--- Comment #7 from Michael Matz matz at gcc dot gnu.org 2011-10-07 17:00:59 
UTC ---
Hmm, I can't build go due to:
../../../gcc/libgo/runtime/sigqueue.goc:79:1: internal compiler error: in
maybe_record_trace_start, at dwarf2cfi.c:2243

but that seems unrelated.


[Bug middle-end/50638] [4.7 Regression] emulated TLS fails

2011-10-07 Thread matz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50638

--- Comment #8 from Michael Matz matz at gcc dot gnu.org 2011-10-07 17:02:00 
UTC ---
Okay, so it's really the emutlv_v variables.  That should be fixed by the 
patch at gcc-patches.


[Bug middle-end/50638] [4.7 Regression] emulated TLS fails

2011-10-07 Thread ro at CeBiTec dot Uni-Bielefeld.DE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50638

--- Comment #9 from ro at CeBiTec dot Uni-Bielefeld.DE ro at CeBiTec dot 
Uni-Bielefeld.DE 2011-10-07 17:03:31 UTC ---
 --- Comment #7 from Michael Matz matz at gcc dot gnu.org 2011-10-07 
 17:00:59 UTC ---
 Hmm, I can't build go due to:
 ../../../gcc/libgo/runtime/sigqueue.goc:79:1: internal compiler error: in
 maybe_record_trace_start, at dwarf2cfi.c:2243

 but that seems unrelated.

Doesn't happen for me on i386-pc-solaris2.[89] as of r179656.

Rainer


[Bug middle-end/50638] [4.7 Regression] emulated TLS fails

2011-10-07 Thread ro at CeBiTec dot Uni-Bielefeld.DE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50638

--- Comment #10 from ro at CeBiTec dot Uni-Bielefeld.DE ro at CeBiTec dot 
Uni-Bielefeld.DE 2011-10-07 17:05:11 UTC ---
 --- Comment #8 from Michael Matz matz at gcc dot gnu.org 2011-10-07 
 17:02:00 UTC ---
 Okay, so it's really the emutlv_v variables.  That should be fixed by the 
 patch at gcc-patches.

I'll try a bootstrap on a different machine, but will only be able to
report results on monday.

Rainer


[Bug middle-end/50638] [4.7 Regression] emulated TLS fails

2011-10-06 Thread hp at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50638

Hans-Peter Nilsson hp at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-10-07
 CC||hp at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #1 from Hans-Peter Nilsson hp at gcc dot gnu.org 2011-10-07 
00:34:21 UTC ---
For cris-elf too, another emutls target.
The full build-gcc.sh regression list for cris-elf at r179625 (last known
working at r179611):
g++.sum g++.dg/tls/static-1.C
gcc.sum gcc.dg/debug/tls-1.c
gcc.sum gcc.dg/tls/nonpic-1.c
gcc.sum gcc.dg/tls/opt-13.c
gcc.sum gcc.dg/tls/opt-14.c
gcc.sum gcc.dg/tls/opt-5.c
gcc.sum gcc.dg/tls/opt-6.c
gcc.sum gcc.dg/tls/opt-8.c
gcc.sum gcc.dg/tls/pr24428-2.c
gcc.sum gcc.dg/tls/pr24428.c
gcc.sum gcc.dg/tls/pr45870.c
gcc.sum gcc.dg/tls/pr47715-5.c
gcc.sum gcc.dg/tls/thr-cse-1.c
gcc.sum gcc.dg/torture/tls/run-gd.c
gcc.sum gcc.dg/torture/tls/run-ie.c
gcc.sum gcc.dg/torture/tls/run-ld.c
gcc.sum gcc.dg/torture/tls/run-le.c
gcc.sum gcc.dg/torture/tls/thr-init-1.c
gcc.sum gcc.dg/torture/tls/thr-init-2.c
gfortran.sum gfortran.dg/select_type_12.f03
(the last one *may* be due to a different bug, see PR50640)


[Bug middle-end/50638] [4.7 Regression] emulated TLS fails

2011-10-06 Thread hp at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50638

--- Comment #2 from Hans-Peter Nilsson hp at gcc dot gnu.org 2011-10-07 
00:39:03 UTC ---
(In reply to comment #1)
 For cris-elf too, another emutls target.
 The full build-gcc.sh regression list for cris-elf at r179625 (last known
 working at r179611):

Sorry, I forgot that list is truncated at 20 lines, here are the 3 ones left:
objc.sum objc.dg/torture/tls/thr-init-2.m
objc.sum objc.dg/torture/tls/thr-init-3.m
objc.sum objc.dg/torture/tls/thr-init.m