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 tree-optimization/106027] [11/12/13 Regression] ICE: 'verify_gimple' failed (error: mismatching comparison operand types) since r11-2450-g10231958fcfb13bc
Date: Mon, 20 Jun 2022 11:40:08 +0000	[thread overview]
Message-ID: <bug-106027-4-anDHxG10Ke@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106027-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the issue seems to be that

#4  0x0000000000f82be3 in fold_binary_loc (loc=2147483656, 
    code=TRUTH_ANDIF_EXPR, type=<integer_type 0x7ffff68dd690 unsigned int>, 
    op0=<nop_expr 0x7ffff6a0f240>, op1=<nop_expr 0x7ffff6a0f220>)
    at /space/rguenther/src/gcc/gcc/fold-const.cc:12044
      /* A < X && A + 1 > Y ==> A < X && A >= Y.  Normally A + 1 > Y
         means A >= Y && A != MAX, but in this case we know that
         A < X <= MAX.  */

      if (!TREE_SIDE_EFFECTS (arg0)
          && !TREE_SIDE_EFFECTS (arg1))
        {
          tem = fold_to_nonsharp_ineq_using_bound (loc, arg0, arg1);
          if (tem && !operand_equal_p (tem, arg0, 0))
            return fold_build2_loc (loc, code, type, tem, arg1);

          tem = fold_to_nonsharp_ineq_using_bound (loc, arg1, arg0);
          if (tem && !operand_equal_p (tem, arg1, 0))
            return fold_build2_loc (loc, code, type, arg0, tem);

builds unsigned type TRUTH_ANDIF_EXPR with signed type arg0/tem (op0/op1
are conversions to unsigned type).  The offending revision just chokes
on the invalid input.

  parent reply	other threads:[~2022-06-20 11:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-19  5:22 [Bug tree-optimization/106027] New: ICE: 'verify_gimple' failed (error: mismatching comparison operand types) asolokha at gmx dot com
2022-06-20  8:15 ` [Bug tree-optimization/106027] [11/12/13 Regression] ICE: 'verify_gimple' failed (error: mismatching comparison operand types) since r11-2450-g10231958fcfb13bc marxin at gcc dot gnu.org
2022-06-20 11:27 ` rguenth at gcc dot gnu.org
2022-06-20 11:40 ` rguenth at gcc dot gnu.org [this message]
2022-06-20 13:02 ` cvs-commit at gcc dot gnu.org
2022-06-20 13:02 ` [Bug middle-end/106027] [11/12 " rguenth at gcc dot gnu.org
2022-07-19 11:38 ` cvs-commit at gcc dot gnu.org
2022-10-11 13:04 ` [Bug middle-end/106027] [11 " cvs-commit at gcc dot gnu.org
2022-10-11 13:05 ` rguenth 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-106027-4-anDHxG10Ke@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).