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/100898] [9/10/11 Regression] ICE with -O2: in gimple_call_arg_ptr, at gimple.h:3264
Date: Thu, 17 Jun 2021 05:59:19 +0000	[thread overview]
Message-ID: <bug-100898-4-fzvfldHdqP@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100898-4@http.gcc.gnu.org/bugzilla/>

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

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

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

commit r11-8589-gd9f75e8a73b1b69b8f709b56296b4a9751c50ef0
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Mon Jun 7 09:25:37 2021 +0200

    tree-inline: Fix up __builtin_va_arg_pack handling [PR100898]

    The following testcase ICEs, because gimple_call_arg_ptr (..., 0)
    asserts that there is at least one argument, while we were using
    it even if we didn't copy anything just to get a pointer from/to which
    the zero arguments should be copied.

    Fixed by guarding the memcpy calls.  Also, the code was calling
    gimple_call_num_args too many times - 5 times instead of 2, so the patch
    adds two temporaries for those.

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

            PR middle-end/100898
            * tree-inline.c (copy_bb): Only use gimple_call_arg_ptr if memcpy
            should copy any arguments.  Don't call gimple_call_num_args
            on id->call_stmt or call_stmt more than once.

            * g++.dg/ext/va-arg-pack-3.C: New test.

    (cherry picked from commit d66a703c8ba86f3ca04cc10c3071696e6d014de6)

  parent reply	other threads:[~2021-06-17  5:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04  3:34 [Bug c/100898] New: " cnsun at uwaterloo dot ca
2021-06-04 13:30 ` [Bug middle-end/100898] [9/10/11/12 Regression] " jakub at gcc dot gnu.org
2021-06-04 13:57 ` jakub at gcc dot gnu.org
2021-06-07  7:26 ` cvs-commit at gcc dot gnu.org
2021-06-07  7:37 ` [Bug middle-end/100898] [9/10/11 " jakub at gcc dot gnu.org
2021-06-07  9:07 ` rguenth at gcc dot gnu.org
2021-06-17  5:59 ` cvs-commit at gcc dot gnu.org [this message]
2021-06-17  7:59 ` [Bug middle-end/100898] [9/10 " jakub at gcc dot gnu.org
2022-05-10  8:18 ` cvs-commit at gcc dot gnu.org
2022-05-11  6:20 ` cvs-commit at gcc dot gnu.org
2022-05-11  6:34 ` 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-100898-4-fzvfldHdqP@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).