re PR c++/88976 (ICE in fold_convert_loc, at fold-const.c:2552)
authorJakub Jelinek <jakub@redhat.com>
Thu, 24 Jan 2019 19:16:21 +0000 (20:16 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 24 Jan 2019 19:16:21 +0000 (20:16 +0100)
commite21c4491293763b5dc61664b6a2292c3a8fc8ae1
treed77ff218bb91e25d21ecb7327c17b83a0538d9bb
parentacac773aaa0434993650c079685a41b78121a619
re PR c++/88976 (ICE in fold_convert_loc, at fold-const.c:2552)

PR c++/88976
* c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
on #pragma omp cancel with different modifiers.

* semantics.c (finish_omp_cancel): Diagnose more than one if
on #pragma omp cancel with different modifiers.  Use
maybe_convert_cond when not in template or build_x_binary_op
otherwise.

* c-c++-common/gomp/cancel-2.c: New test.
* gcc.dg/gomp/cancel-1.c: New test.
* g++.dg/gomp/cancel-1.C: New test.
* g++.dg/gomp/cancel-2.C: New test.
* g++.dg/gomp/cancel-3.C: New test.

From-SVN: r268245
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/cp/ChangeLog
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/gomp/cancel-2.c [new file with mode: 0644]
gcc/testsuite/g++.dg/gomp/cancel-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/gomp/cancel-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/gomp/cancel-3.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/gomp/cancel-1.c [new file with mode: 0644]