public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/107300] [13 Regression] ICE: verify_ssa failed (error: virtual definition of statement not up to date)
Date: Wed, 30 Nov 2022 17:10:35 +0000	[thread overview]
Message-ID: <bug-107300-4-IatmYA9EP1@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107300-4@http.gcc.gnu.org/bugzilla/>

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org,
                   |                            |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The problem related to __builtin_unreachable -> __builtin_trap is during
redirect_to_unreachable, which now calls:
253       struct cgraph_node *target
254         = cgraph_node::get_create (builtin_decl_unreachable ());
and that for -funreachable-traps doesn't return __builtin_unreachable () (which
doesn't need vops) but __builtin_trap () which does.
We have also IFN_TRAP internal call which is like __builtin_trap () except it
doesn't need vops.  So, perhaps one way to fix this would be in
redirect_call_stmt_to_callee or in inline_transform to special case
redirections to BUILT_IN_TRAP if the call stmt doesn't have vdef and replace
them with IFN_TRAP call rather than __builtin_trap in that case.  A problem is
that internal calls don't have cgraph edges, so we'd need to remove the edge
after the adjustment rather than keep it.
Or redirect_to_unreachable could just builtin_decl_implicit
(BUILT_IN_UNREACHABLE), but then again is a question where if any would we
change it into __ubsan_handle_builtin_unreachable for -fsanitize=unreachable or
__builtin_trap/IFN_TRAP later on.

  parent reply	other threads:[~2022-11-30 17:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18  3:33 [Bug tree-optimization/107300] New: " asolokha at gmx dot com
2022-10-18  7:32 ` [Bug ipa/107300] [13 Regression] " rguenth at gcc dot gnu.org
2022-10-18  7:54 ` marxin at gcc dot gnu.org
2022-10-18  7:55 ` rguenth at gcc dot gnu.org
2022-10-19 17:34 ` pinskia at gcc dot gnu.org
2022-11-30 17:10 ` jakub at gcc dot gnu.org [this message]
2022-12-01 15:11 ` marxin at gcc dot gnu.org
2022-12-01 15:27 ` jakub at gcc dot gnu.org
2022-12-20 14:36 ` rguenth at gcc dot gnu.org
2023-02-02  9:55 ` cvs-commit at gcc dot gnu.org
2023-02-02 12:57 ` 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-107300-4-IatmYA9EP1@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).