PR c++/79664
commitd6a08f5cb4fb3fbe5a22d0aadae6ed2964266cc0
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Feb 2017 22:36:20 +0000 (22 22:36 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Feb 2017 22:36:20 +0000 (22 22:36 +0000)
treee23a668b7cc255c235fd2264ebcb71d90ea00151
parent3c5bc375b109f2a12a53825a09213e71c8f56691
PR c++/79664
* parser.c (cp_parser_omp_teams, cp_parser_omp_target): Use
SET_EXPR_LOCATION on OMP_TARGET/OMP_TEAMS tree.
* constexpr.c (potential_constant_expression_1): Handle
OMP_*, OACC_* and CILK_* trees.  Use error_at with
EXPR_LOC_OR_LOC (t, input_location) computed early
instead of error, or error_at with location_of (t).

* g++.dg/gomp/teams-1.C: Adjust expected diagnostic location.
* g++.dg/cpp1y/constexpr-throw.C: Likewise.
* g++.dg/gomp/pr79664.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245662 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/constexpr-throw.C
gcc/testsuite/g++.dg/gomp/pr79664.C [new file with mode: 0644]
gcc/testsuite/g++.dg/gomp/teams-1.C