public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/100859] [12 Regression][OpenMP] ICE in tsubst_omp_clauses, at cp/pt.c:17520 since r12-1108-g9a5de4d5af1c10a8
Date: Thu, 03 Jun 2021 08:46:55 +0000	[thread overview]
Message-ID: <bug-100859-4-G9uizO5MvW@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100859-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:098f4e989beb1a1be1157430c56ea4f158c1d538

commit r12-1171-g098f4e989beb1a1be1157430c56ea4f158c1d538
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Jun 3 10:38:08 2021 +0200

    openmp: Assorted depend/affinity/iterator related fixes [PR100859]

    The depend-iterator-3.C testcases shows various bugs.

    1) tsubst_omp_clauses didn't handle OMP_CLAUSE_AFFINITY (should be
       handled like OMP_CLAUSE_DEPEND)
    2) because locators can be arbitrary lvalue expressions, we need
       to allow for C++ array section base (especially when array section
       is just an array reference) FIELD_DECLs, handle them as this->member,
       but don't need to privatize in any way
    3) similarly for this as base
    4) depend(inout: this) is invalid, but for different reason than the
reported
       one, again this is an expression, but not lvalue expression, so that
       should be reported
    5) the ctor/dtor cloning in the C++ FE (which is using walk_tree with
       copy_tree_body_r) didn't handle iterators correctly, walk_tree normally
       doesn't walk TREE_PURPOSE of TREE_LIST, and in the iterator case
       that TREE_VEC contains also a BLOCK that needs special handling during
       copy_tree_body_r

    2021-06-03  Jakub Jelinek  <jakub@redhat.com>

            PR c++/100859
    gcc/
            * tree-inline.c (copy_tree_body_r): Handle iterators on
            OMP_CLAUSE_AFFINITY or OMP_CLAUSE_DEPEND.
    gcc/c/
            * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
            after depend only cases.
    gcc/cp/
            * semantics.c (handle_omp_array_sections_1): For
            OMP_CLAUSE_{AFFINITY,DEPEND} handle FIELD_DECL base using
            finish_non_static_data_member and allow this as base.
            (finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
            after depend only cases.  Let this be diagnosed by !lvalue_p
            case for OMP_CLAUSE_{AFFINITY,DEPEND} and remove useless
            assert.
            * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_AFFINITY.
    gcc/testsuite/
            * g++.dg/gomp/depend-iterator-3.C: New test.
            * g++.dg/gomp/this-1.C: Don't expect any diagnostics for
            this as base expression of depend array section, expect a different
            error wording for this as depend locator and add testcases
            for affinity clauses.

  parent reply	other threads:[~2021-06-03  8:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 15:25 [Bug c++/100859] New: ICE in tsubst_omp_clauses, at cp/pt.c:17520 asolokha at gmx dot com
2021-06-02  6:29 ` [Bug c++/100859] [12 Regression] ICE in tsubst_omp_clauses, at cp/pt.c:17520 since r12-1108-g9a5de4d5af1c10a8 marxin at gcc dot gnu.org
2021-06-02  7:40 ` [Bug c++/100859] [12 Regression][OpenMP] " burnus at gcc dot gnu.org
2021-06-02  8:01 ` rguenth at gcc dot gnu.org
2021-06-02  8:44 ` jakub at gcc dot gnu.org
2021-06-02  9:51 ` jakub at gcc dot gnu.org
2021-06-02  9:57 ` jakub at gcc dot gnu.org
2021-06-02 12:16 ` jakub at gcc dot gnu.org
2021-06-03  8:46 ` cvs-commit at gcc dot gnu.org [this message]
2021-06-04  9:22 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-100859-4-G9uizO5MvW@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).