https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84791
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Mon Jun 25 17:41:34 2018 New Revision: 262088 URL: https://gcc.gnu.org/viewcvs?rev=262088&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-6-branch/gcc/testsuite/g++.dg/gomp/pr84791.C Modified: branches/gcc-6-branch/gcc/cp/ChangeLog branches/gcc-6-branch/gcc/cp/semantics.c branches/gcc-6-branch/gcc/testsuite/ChangeLog