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 middle-end/100872] [12 Regression] [OpenMP] internal compiler error: tree check: expected integer_cst, have mult_expr in simd_clone_clauses_extract, at omp-simd-clone.c:253
Date: Fri, 04 Jun 2021 09:17:56 +0000	[thread overview]
Message-ID: <bug-100872-4-OE6LxK2SWF@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100872-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 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:3011f1046628d5ce5e6e5f8e917a6aea1385fdc3

commit r12-1204-g3011f1046628d5ce5e6e5f8e917a6aea1385fdc3
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Jun 4 11:17:05 2021 +0200

    c++: Fix up attribute handling in methods in templates [PR100872]

    The following testcase FAILs because a dependent (late) attribute is never
    tsubsted.  While the testcase is OpenMP, I think it is a generic C++ FE
problem
    that could affect any other dependent attribute.

    apply_late_template_attributes documents that it relies on
      /* save_template_attributes puts the dependent attributes at the
beginning of
         the list; find the non-dependent ones.  */
    The "operator binding" attributes that are sometimes added are added to the
    head of DECL_ATTRIBUTES list though and because it doesn't have
    ATTR_IS_DEPENDENT set it violates this requirement.

    The following patch fixes it by adding that attribute after all
    ATTR_IS_DEPENDENT attributes.  I'm not 100% sure if DECL_ATTRIBUTES can't
be
    shared by multiple functions (e.g. the cdtor clones), but the code uses
    later remove_attribute which could break that too.

    Other option would be to copy_list the ATTR_IS_DEPENDENT portion of the
    DECL_ATTRIBUTES list if we need to do this, that would be the same as this
    patch but replace that *ap = op_attr; at the end with
          *ap = NULL_TREE;
          DECL_ATTRIBUTES (cfn) = chainon (copy_list (DECL_ATTRIBUTES (cfn)),
                                           op_attr);
    Or perhaps set ATTR_IS_DEPENDENT on the "operator bindings" attribute,
    though it would need to be studied what would it try to do with the
    attribute during tsubst.

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

            PR c++/100872
            * name-lookup.c (maybe_save_operator_binding): Add op_attr after
all
            ATTR_IS_DEPENDENT attributes in the DECL_ATTRIBUTES list rather
than
            to the start.

            * g++.dg/gomp/declare-simd-8.C: New test.

  parent reply	other threads:[~2021-06-04  9:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-02  8:22 [Bug middle-end/100872] New: " burnus at gcc dot gnu.org
2021-06-02 11:03 ` [Bug middle-end/100872] " burnus at gcc dot gnu.org
2021-06-02 14:26 ` [Bug middle-end/100872] [12 Regression] " jakub at gcc dot gnu.org
2021-06-02 14:26 ` jakub at gcc dot gnu.org
2021-06-04  9:17 ` cvs-commit at gcc dot gnu.org [this message]
2021-06-04  9:21 ` 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-100872-4-OE6LxK2SWF@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).