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 tree-optimization/99777] [11 Regression] ICE in build2, at tree.c:4869 with -O3
Date: Tue, 30 Mar 2021 22:41:55 +0000	[thread overview]
Message-ID: <bug-99777-4-Ol8NGFbAhj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99777-4@http.gcc.gnu.org/bugzilla/>

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

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

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

commit r10-9625-gafe9a630eae114665e77402ea083201c9d406e99
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Mon Mar 29 12:35:32 2021 +0200

    fold-const: Fix ICE in extract_muldiv_1 [PR99777]

    extract_muldiv{,_1} is apparently only prepared to handle scalar integer
    operations, the callers ensure it by only calling it if the divisor or
    one of the multiplicands is INTEGER_CST and because neither multiplication
    nor division nor modulo are really supported e.g. for pointer types,
nullptr
    type etc.  But the CASE_CONVERT handling doesn't really check if it isn't
    a cast from some other type kind, so on the testcase we end up trying to
    build MULT_EXPR in POINTER_TYPE which ICEs.  A few years ago Marek has
    added ANY_INTEGRAL_TYPE_P checks to two spots, but the code uses
    TYPE_PRECISION which means something completely different for vector types,
    etc.
    So IMNSHO we should just punt on conversions from non-integrals or
    non-scalar integrals.

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

            PR tree-optimization/99777
            * fold-const.c (extract_muldiv_1): For conversions, punt on casts
from
            types other than scalar integral types.

            * g++.dg/torture/pr99777.C: New test.

  parent reply	other threads:[~2021-03-30 22:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25 22:31 [Bug tree-optimization/99777] New: " vsevolod.livinskij at frtk dot ru
2021-03-25 23:31 ` [Bug tree-optimization/99777] [11 Regression] " jakub at gcc dot gnu.org
2021-03-25 23:34 ` jakub at gcc dot gnu.org
2021-03-26 10:55 ` jakub at gcc dot gnu.org
2021-03-29 10:36 ` cvs-commit at gcc dot gnu.org
2021-03-29 10:37 ` jakub at gcc dot gnu.org
2021-03-30 22:41 ` cvs-commit at gcc dot gnu.org [this message]
2021-04-20 23:34 ` cvs-commit at gcc dot gnu.org
2021-04-22 16:52 ` cvs-commit 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-99777-4-Ol8NGFbAhj@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).