re PR c/45784 (gcc OpenMP - error: invalid controlling predicate)
authorJakub Jelinek <jakub@redhat.com>
Thu, 27 Jul 2017 19:13:42 +0000 (21:13 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 27 Jul 2017 19:13:42 +0000 (21:13 +0200)
commita40ff0ae8b8d28d5713792ca108f688f2ca4825a
tree8e297a3f30cbc148915200b3e303439c75bae8c3
parent1f9e09b55416098b04b3071549cdd53ab95ff8b5
re PR c/45784 (gcc OpenMP - error: invalid controlling predicate)

PR c/45784
* c-omp.c (c_finish_omp_for): If the condition is wrapped in
rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
new COMPOUND_EXPRs around the rhs of the comparison.

* testsuite/libgomp.c/pr45784.c: New test.
* testsuite/libgomp.c++/pr45784.C: New test.

From-SVN: r250635
gcc/c-family/ChangeLog
gcc/c-family/c-omp.c
libgomp/ChangeLog
libgomp/testsuite/libgomp.c++/pr45784.C [new file with mode: 0644]
libgomp/testsuite/libgomp.c/pr45784.c [new file with mode: 0644]