------- Comment #2 from danglin at gcc dot gnu dot org  2007-12-26 23:13 -------
Breakpoint 5, dbxout_symbol_location (decl=0x40053808, type=0x40068808,
    suffix=0x400561dc "~*", home=0x40010248) at ../../gcc/gcc/dbxout.c:2825
2825      if (GET_CODE (home) == SUBREG)
(gdb) p debug_tree ($r26)
 <var_decl 7ade6160 thrc
    type <record_type 7ae1ea90 BLK
        size <integer_cst 7addea80 constant invariant 256>
        unit size <integer_cst 7adde2c0 constant invariant 32>
        align 32 symtab 0 alias set 17 canonical type 7ae1ea90
        fields <field_decl 7ae1b600 bar1 type <record_type 7ae1e680
array1_integer(kind=4)>
            BLK file
/test/gnu/gcc/gcc/libgomp/testsuite/libgomp.fortran/threadprivate2.f90 line 12
col 0
            size <integer_cst 7ae16700 constant invariant 192>
            unit size <integer_cst 7ae16600 constant invariant 24>
            align 32 offset_align 64
            offset <integer_cst 7adde300 constant invariant 0>
            bit offset <integer_cst 7adde880 constant invariant 0> context
<record_type 7ae1ea90> chain <field_decl 7ae1b660 bar2>>
        pointer_to_this <pointer_type 7ae2ea28>>
    addressable used public static common tls-local-exec decl_3 BLK file
/test/gnu/gcc/gcc/libgomp/testsuite/libgomp.fortran/threadprivate2.f90 line 14
col 0 size <integer_cst 7addea80 256> unit size <integer_cst 7adde2c0 32>
    align 64 context <function_decl 7ae1c5b0 MAIN__>
    (mem/s/c:BLK (symbol_ref:SI ("thrc_") <var_decl 7ade6160 thrc>) [17 thrc+0
S32 A64]) chain <function_decl 7ae1c5b0 MAIN__>>

In the test, we have:

  common /thrc/ bar1, bar2
!$omp threadprivate (/thrc/)

The symbol naming seems messed up when using emulated TLS.


-- 


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

Reply via email to