https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101759

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:dd345961831980e3103411d61bba249efa2ee720

commit r11-8859-gdd345961831980e3103411d61bba249efa2ee720
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Wed Aug 4 11:53:48 2021 +0200

    c++: Fix up #pragma omp declare {simd,variant} and acc routine parsing

    When parsing default arguments, we need to temporarily clear
parser->omp_declare_simd
    and parser->oacc_routine, otherwise it can clash with further declarations
    inside of e.g. lambdas inside of those default arguments.

    2021-08-04  Jakub Jelinek  <ja...@redhat.com>

            PR c++/101759
            * parser.c (cp_parser_default_argument): Temporarily override
            parser->omp_declare_simd and parser->oacc_routine to NULL.

            * g++.dg/gomp/pr101759.C: New test.
            * g++.dg/goacc/pr101759.C: New test.

    (cherry picked from commit af31cab04770f7a1a1da069415ab62ca2ef54fc4)

Reply via email to