public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/55563] New: OpenMP not marking variable as thread-local
@ 2012-12-02 17:16 dje at gcc dot gnu.org
  2012-12-02 17:18 ` [Bug middle-end/55563] " dje at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dje at gcc dot gnu.org @ 2012-12-02 17:16 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55563
           Summary: OpenMP not marking variable as thread-local
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dje@gcc.gnu.org


OpenMP threadprivate variables are not marked as thread-local at time when pool
storage is chosen. For example, libgomp.c/copyin-1.c

int thr = 32;
#pragma omp threadprivate (thr)

In varasm.c:use_blocks_for_decl_p(), the variable thread is marked as
TLS_MODEL_NONE

Breakpoint 2, _ZL21use_blocks_for_decl_pP9tree_node (decl=0x701634e0)
    at /nasfarm/dje/src/src/gcc/varasm.c:1116
1116      return targetm.use_blocks_for_decl_p (decl);
(gdb) print decl
$9 = (tree) 0x701634e0
(gdb) print debug_tree(decl)
 <var_decl 701634e0 thr
    type <integer_type 700153c0 int public SI
        size <integer_cst 700065e0 constant 32>
        unit size <integer_cst 70006600 constant 4>
        align 32 symtab 0 alias set -1 canonical type 700153c0 precision 32 min
<integer_cst 70006900 -2147483648> max <integer_cst 70006920 2147483647>
        pointer_to_this <pointer_type 70015ae0>>
    public static SI file copyin-1.c line 8 col 5 size <integer_cst 700065e0
32> unit size <integer_cst 70006600 4>
    align 32 initial <integer_cst 700f8660 32>>
$10 = 10
(gdb) print decl->decl_with_vis.tls_model
$11 = TLS_MODEL_NONE

This does not happen with variables declared with __thread, but does with
OpenMP and variables annotated using #pragma.

The variable later is transformed to TLS, but wrong choices have been made and
the now TLS variable is defined incorrectly in the assembly file.


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

* [Bug middle-end/55563] OpenMP not marking variable as thread-local
  2012-12-02 17:16 [Bug middle-end/55563] New: OpenMP not marking variable as thread-local dje at gcc dot gnu.org
@ 2012-12-02 17:18 ` dje at gcc dot gnu.org
  2013-03-22 14:44 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dje at gcc dot gnu.org @ 2012-12-02 17:18 UTC (permalink / raw)
  To: gcc-bugs


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

David Edelsohn <dje at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |powerpc-ibm-aix*
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |openmp, wrong-code
   Last reconfirmed|                            |2012-12-02
                 CC|                            |jakub at gcc dot gnu.org
               Host|                            |powerpc-ibm-aix*
     Ever Confirmed|0                           |1
   Target Milestone|---                         |4.8.0
              Build|                            |powerpc-ibm-aix*

--- Comment #1 from David Edelsohn <dje at gcc dot gnu.org> 2012-12-02 17:18:30 UTC ---
Confirmed.


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

* [Bug middle-end/55563] OpenMP not marking variable as thread-local
  2012-12-02 17:16 [Bug middle-end/55563] New: OpenMP not marking variable as thread-local dje at gcc dot gnu.org
  2012-12-02 17:18 ` [Bug middle-end/55563] " dje at gcc dot gnu.org
@ 2013-03-22 14:44 ` jakub at gcc dot gnu.org
  2013-05-31 11:03 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-22 14:44 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.0                       |4.8.1

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-22 14:43:42 UTC ---
GCC 4.8.0 is being released, adjusting target milestone.


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

* [Bug middle-end/55563] OpenMP not marking variable as thread-local
  2012-12-02 17:16 [Bug middle-end/55563] New: OpenMP not marking variable as thread-local dje at gcc dot gnu.org
  2012-12-02 17:18 ` [Bug middle-end/55563] " dje at gcc dot gnu.org
  2013-03-22 14:44 ` jakub at gcc dot gnu.org
@ 2013-05-31 11:03 ` jakub at gcc dot gnu.org
  2013-10-16  9:51 ` jakub at gcc dot gnu.org
  2015-06-22 14:26 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-05-31 11:03 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.1                       |4.8.2

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.1 has been released.


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

* [Bug middle-end/55563] OpenMP not marking variable as thread-local
  2012-12-02 17:16 [Bug middle-end/55563] New: OpenMP not marking variable as thread-local dje at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-05-31 11:03 ` jakub at gcc dot gnu.org
@ 2013-10-16  9:51 ` jakub at gcc dot gnu.org
  2015-06-22 14:26 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-10-16  9:51 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.2                       |4.8.3

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.2 has been released.


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

* [Bug middle-end/55563] OpenMP not marking variable as thread-local
  2012-12-02 17:16 [Bug middle-end/55563] New: OpenMP not marking variable as thread-local dje at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2013-10-16  9:51 ` jakub at gcc dot gnu.org
@ 2015-06-22 14:26 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-22 14:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55563

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.3                       |---


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

end of thread, other threads:[~2015-06-22 14:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-02 17:16 [Bug middle-end/55563] New: OpenMP not marking variable as thread-local dje at gcc dot gnu.org
2012-12-02 17:18 ` [Bug middle-end/55563] " dje at gcc dot gnu.org
2013-03-22 14:44 ` jakub at gcc dot gnu.org
2013-05-31 11:03 ` jakub at gcc dot gnu.org
2013-10-16  9:51 ` jakub at gcc dot gnu.org
2015-06-22 14:26 ` rguenth at gcc dot gnu.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).