public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/113692] ICE: in lower_stmt, at gimple-lower-bitint.cc:5444 at -O with _BitInt() in a condition
Date: Wed, 31 Jan 2024 21:50:05 +0000 [thread overview]
Message-ID: <bug-113692-4-7NC1qiivut@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113692-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113692
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2024-01-31
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> My bet you could get the same error with:
> _BitInt(129) i;
>
> void *
> foo(void)
> {
> void *ret = 0;
> ret = (void *)(__SIZETYPE__)(i & 1);
> return ret;
> }
the above works.
The question is there an extra cast in the IR between _BitInt and void*
required or not?
PHIOPT/match-and-simplify does:
```
phiopt match-simplify trying:
_2 != 0 ? 1B : 0B
Matching expression match.pd:2274, gimple-match-3.cc:23
Matching expression match.pd:2823, gimple-match-2.cc:35
Matching expression match.pd:2826, gimple-match-1.cc:66
Matching expression match.pd:2833, gimple-match-2.cc:96
Matching expression match.pd:2274, gimple-match-3.cc:23
Applying pattern match.pd:3396, gimple-match-6.cc:2527
Applying pattern match.pd:5327, gimple-match-9.cc:17991
phiopt match-simplify back:
_5 = _2 != 0;
_6 = (void *) _2;
result: _6
```
Notice how there is just cast a between _2 and `void*`.
next prev parent reply other threads:[~2024-01-31 21:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 21:20 [Bug tree-optimization/113692] New: " zsojka at seznam dot cz
2024-01-31 21:25 ` [Bug tree-optimization/113692] " pinskia at gcc dot gnu.org
2024-01-31 21:50 ` pinskia at gcc dot gnu.org [this message]
2024-02-01 7:48 ` rguenth at gcc dot gnu.org
2024-02-01 11:03 ` jakub at gcc dot gnu.org
2024-02-01 11:30 ` jakub at gcc dot gnu.org
2024-02-02 10:30 ` cvs-commit at gcc dot gnu.org
2024-02-02 10: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-113692-4-7NC1qiivut@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).