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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:39dc66558e066e67fd40f21f53cee80989ae742d

commit r13-2696-g39dc66558e066e67fd40f21f53cee80989ae742d
Author: Jason Merrill <ja...@redhat.com>
Date:   Thu Sep 15 22:55:50 2022 +0200

    c++: member fn in omp loc list [PR106858]

    this-f names a member function, which isn't an addressable lvalue.  Give a
    helpful error instead of crashing.  The first hunk makes the error range
    cover the whole expression.

            PR c++/106858

    gcc/cp/ChangeLog:

            * parser.cc (cp_parser_omp_var_list_no_open): Pass the
            initial token location down.
            * semantics.cc (finish_omp_clauses): Check
            invalid_nonstatic_memfn_p.
            * typeck.cc (invalid_nonstatic_memfn_p): Handle null TREE_TYPE.

    gcc/testsuite/ChangeLog:

            * g++.dg/gomp/map-3.C: New test.

Reply via email to