public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/114312] ICE: SIGSEGV: infinite recursion in chrec_fold_plus_1 (tree-chrec.cc:336) at -O3 with _BitInt()
Date: Tue, 12 Mar 2024 14:17:29 +0000	[thread overview]
Message-ID: <bug-114312-4-Yrk7X0NySg@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114312-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Meh, fixed by

commit 73dac51b32575f980289c073969c6d825963d076 (origin/master, origin/HEAD)
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Mar 12 14:00:05 2024 +0100

    tree-optimization/114121 - chrec_fold_{plus,multiply} and recursion

    The following addresses endless recursion in the
    chrec_fold_{plus,multiply} functions when handling sign-conversions.
    We only need to apply tricks when we'd fail (there's a chrec in the
    converted operand) and we need to make sure to not turn the other
    operand into something worse (for the chrec-vs-chrec case).

            PR tree-optimization/114121
            * tree-chrec.cc (chrec_fold_plus_1): Guard recursion with
            converted operand properly.
            (chrec_fold_multiply): Likewise.  Handle missed recursion.

            * gcc.dg/torture/pr114312.c: New testcase.

      parent reply	other threads:[~2024-03-12 14:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11 18:58 [Bug middle-end/114312] New: " zsojka at seznam dot cz
2024-03-11 20:43 ` [Bug middle-end/114312] " pinskia at gcc dot gnu.org
2024-03-12 12:04 ` rguenth at gcc dot gnu.org
2024-03-12 14:17 ` rguenth at gcc dot gnu.org [this message]

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-114312-4-Yrk7X0NySg@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).