https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65809
--- Comment #8 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Iain Sandoe from comment #7) > (In reply to Jakub Jelinek from comment #6) > > --- gcc/dbxout.c 2015-02-04 23:36:33.875630546 +0100 > > +++ gcc/dbxout.c 2015-04-20 12:27:14.579948127 +0200 > > @@ -2999,6 +2999,8 @@ dbxout_symbol_location (tree decl, tree > > > > if (MEM_P (home) && GET_CODE (XEXP (home, 0)) == SYMBOL_REF) > > { > > + if (SYMBOL_REF_TLS_MODEL (XEXP (home, 0)) != TLS_MODEL_NONE) > > + return 0; > > if (TREE_PUBLIC (decl)) > > { > > int offs; hmm .. not as things stand .. (gdb) p debug_rtx(home) (mem/c:BLK (symbol_ref:SI ("__emutls_v.a") [flags 0x1402] <var_decl 0x14260ed80 __emutls_v.a>) [0 __emutls_v.a+0 S16 A32]) (flags [5:3] contain the tls model which is 0 == TLS_MODEL_NONE in the case above). Current language: auto; currently c++ (gdb) p debug_tree(decl) <var_decl 0x14260e990 a type <array_type 0x14271d888 type <record_type 0x14271d738 S type_0 DI size <integer_cst 0x142601d20 constant 64> unit size <integer_cst 0x142601d38 constant 8> align 32 symtab 18 alias set -1 canonical type 0x14271d738 fields <field_decl 0x142626980 s> context <translation_unit_decl 0x1424cf258 D.1823> pointer_to_this <pointer_type 0x14271d930> chain <type_decl 0x1426268e8 D.1815>> BLK size <integer_cst 0x14261d300 constant 640> unit size <integer_cst 0x142712870 constant 80> align 32 symtab 0 alias set -1 canonical type 0x14271d888 domain <integer_type 0x14271d7e0 type <integer_type 0x1426050a8 sizetype> SI size <integer_cst 0x142601cc0 constant 32> unit size <integer_cst 0x142601cd8 constant 4> align 32 symtab 0 alias set -1 canonical type 0x14271d7e0 precision 32 min <integer_cst 0x142601cf0 0> max <integer_cst 0x142712810 9>>> addressable used public static BLK file /GCC/gcc-trunk/gcc/testsuite/gcc.dg/debug/pr65771.c line 6 col 19 size <integer_cst 0x14261d300 640> unit size <integer_cst 0x142712870 80> align 32 context <translation_unit_decl 0x1424cf258 D.1823> value-expr <var_decl 0x14260ed80 __emutls_v.a type <record_type 0x14271dd20 __emutls_object BLK size <integer_cst 0x14261d030 constant 128> unit size <integer_cst 0x14261d048 constant 16> align 32 symtab 0 alias set -1 canonical type 0x14271dd20 fields <field_decl 0x142626c78 __size>> asm_written used public static ignored BLK file /GCC/gcc-trunk/gcc/testsuite/gcc.dg/debug/pr65771.c line 6 col 19 size <integer_cst 0x14261d030 128> unit size <integer_cst 0x14261d048 16> align 32 context <translation_unit_decl 0x1424cf258 D.1823> initial <constructor 0x1427129a8> (mem/c:BLK (symbol_ref:SI ("__emutls_v.a") [flags 0x1402] <var_decl 0x14260ed80 __emutls_v.a>) [0 __emutls_v.a+0 S16 A32])> chain <var_decl 0x14260ea20 b>> (gdb) p decl->decl_common.ignored_flag $3 = 0 (gdb) p decl_tls_model(decl) $4 = TLS_MODEL_NONE