]> git.ipfire.org Git - thirdparty/gcc.git/commit
backport: re PR c/81687 (Compiler drops label in OpenMP region)
authorJakub Jelinek <jakub@redhat.com>
Fri, 15 Sep 2017 21:37:16 +0000 (23:37 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 15 Sep 2017 21:37:16 +0000 (23:37 +0200)
commit2f702d5bc36b7b78747728139babe0ff4995b040
tree71b4445ce6f8d336a05af2e6e87cafd86b51e7a0
parent40e90247138350ed9cbc4a811f198ee518216ac7
backport: re PR c/81687 (Compiler drops label in OpenMP region)

Backported from mainline
2017-08-09  Jakub Jelinek  <jakub@redhat.com>

PR c/81687
* omp-low.c (omp_copy_decl): Don't remap FORCED_LABEL or DECL_NONLOCAL
LABEL_DECLs.
* tree-cfg.c (move_stmt_op): Don't adjust DECL_CONTEXT of FORCED_LABEL
or DECL_NONLOCAL labels.
(move_stmt_r) <case GIMPLE_LABEL>: Adjust DECL_CONTEXT of FORCED_LABEL
or DECL_NONLOCAL labels here.

* testsuite/libgomp.c/pr81687-1.c: New test.
* testsuite/libgomp.c/pr81687-2.c: New test.

From-SVN: r252858
gcc/ChangeLog
gcc/omp-low.c
gcc/tree-cfg.c
libgomp/ChangeLog
libgomp/testsuite/libgomp.c/pr81687-1.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/pr81687-2.c [new file with mode: 0644]