https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84791
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Jun 22 21:02:52 2018 New Revision: 261943 URL: https://gcc.gnu.org/viewcvs?rev=261943&root=gcc&view=rev Log: Backported from mainline 2018-03-30 Jakub Jelinek <ja...@redhat.com> PR c++/84791 * semantics.c (finish_omp_reduction_clause): If OMP_CLAUSE_REDUCTION_PLACEHOLDER is error_mark_node, return true even if processing_template_decl. * g++.dg/gomp/pr84791.C: New test. Added: branches/gcc-7-branch/gcc/testsuite/g++.dg/gomp/pr84791.C Modified: branches/gcc-7-branch/gcc/cp/ChangeLog branches/gcc-7-branch/gcc/cp/semantics.c branches/gcc-7-branch/gcc/testsuite/ChangeLog