https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79664
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Wed Feb 22 22:36:20 2017 New Revision: 245662 URL: https://gcc.gnu.org/viewcvs?rev=245662&root=gcc&view=rev Log: 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. Added: trunk/gcc/testsuite/g++.dg/gomp/pr79664.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/constexpr.c trunk/gcc/cp/parser.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-throw.C trunk/gcc/testsuite/g++.dg/gomp/teams-1.C