re PR c++/60702 (thread_local initialization)
authorJakub Jelinek <jakub@redhat.com>
Fri, 22 Mar 2019 14:42:57 +0000 (15:42 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 22 Mar 2019 14:42:57 +0000 (15:42 +0100)
commit5c3703c552d12e7e62febf4fe5deb837a1305f78
tree34ce504ac15714e9dbd07318be4a9cfce6c3c7b5
parenta15ffa22b5b541a385e509649dc39db59492bcdb
re PR c++/60702 (thread_local initialization)

PR c++/60702
* cp-tree.h (get_tls_wrapper_fn): Remove declaration.
(maybe_get_tls_wrapper_call): Declare.
* decl2.c (get_tls_wrapper_fn): Make static.
(maybe_get_tls_wrapper_call): New function.
* typeck.c (build_class_member_access_expr): Handle accesses to TLS
variables.
* semantics.c (finish_qualified_id_expr): Likewise.
(finish_id_expression_1): Use maybe_get_tls_wrapper_call.
* pt.c (tsubst_copy_and_build): Likewise.

* g++.dg/tls/thread_local11.C: New test.
* g++.dg/tls/thread_local11.h: New test.
* g++.dg/tls/thread_local12a.C: New test.
* g++.dg/tls/thread_local12b.C: New test.
* g++.dg/tls/thread_local12c.C: New test.
* g++.dg/tls/thread_local12d.C: New test.
* g++.dg/tls/thread_local12e.C: New test.
* g++.dg/tls/thread_local12f.C: New test.
* g++.dg/tls/thread_local12g.C: New test.
* g++.dg/tls/thread_local12h.C: New test.
* g++.dg/tls/thread_local12i.C: New test.
* g++.dg/tls/thread_local12j.C: New test.
* g++.dg/tls/thread_local12k.C: New test.
* g++.dg/tls/thread_local12l.C: New test.

From-SVN: r269875
21 files changed:
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tls/thread_local11.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tls/thread_local11.h [new file with mode: 0644]
gcc/testsuite/g++.dg/tls/thread_local12a.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tls/thread_local12b.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tls/thread_local12c.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tls/thread_local12d.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tls/thread_local12e.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tls/thread_local12f.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tls/thread_local12g.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tls/thread_local12h.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tls/thread_local12i.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tls/thread_local12j.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tls/thread_local12k.C [new file with mode: 0644]
gcc/testsuite/g++.dg/tls/thread_local12l.C [new file with mode: 0644]