re PR c/81687 (Compiler drops label in OpenMP region)
authorJakub Jelinek <jakub@redhat.com>
Thu, 10 Aug 2017 00:33:20 +0000 (02:33 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 10 Aug 2017 00:33:20 +0000 (02:33 +0200)
commit50aa16c38821e9cba4fabf6ca4b601b34b84a9c8
tree63f1d98ac39aa578be9ea5c5e5147588e4859ed5
parent47ee1b7c10f2aa90645b0d2a94926fa2a674450c
re PR c/81687 (Compiler drops label in OpenMP region)

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: r251019
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]