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 c++/114888] [14/15 Regression] ICE when cross compiling binutils
Date: Mon, 29 Apr 2024 14:13:16 +0000 [thread overview]
Message-ID: <bug-114888-4-SeL0NIXe0Z@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114888-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114888
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Patrick Palka from comment #3)
> Seems we're missing a dependence check in the sizeof / sizeof code:
>
> diff --git a/gcc/cp/typeck.cc b/gcc/cp/typeck.cc
> index e5a52dc2b39..284f6e29e36 100644
> --- a/gcc/cp/typeck.cc
> +++ b/gcc/cp/typeck.cc
> @@ -5500,7 +5500,7 @@ cp_build_binary_op (const op_location_t &location,
> type0 = TREE_TYPE (type0);
> if (!TYPE_P (type1))
> type1 = TREE_TYPE (type1);
> - if (type0
> + if (type0 && type1
> && INDIRECT_TYPE_P (type0)
> && same_type_p (TREE_TYPE (type0), type1))
> {
Yeah, I was about to suggest that too (just with && on a separate line.
I wonder if TREE_TYPE (type0) could be NULL even when type0 is INDIRECT_TYPE_P,
if yes,
we should be testing also && TREE_TYPE (type0) after the INDIRECT_TYPE_P check.
next prev parent reply other threads:[~2024-04-29 14:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-29 12:09 [Bug c++/114888] New: " lordrasmus at gmail dot com
2024-04-29 13:41 ` [Bug c++/114888] " jakub at gcc dot gnu.org
2024-04-29 13:59 ` [Bug c++/114888] [14 Regression] " jakub at gcc dot gnu.org
2024-04-29 14:11 ` [Bug c++/114888] [14/15 " ppalka at gcc dot gnu.org
2024-04-29 14:13 ` jakub at gcc dot gnu.org [this message]
2024-04-29 14:18 ` jakub at gcc dot gnu.org
2024-04-29 14:23 ` ppalka at gcc dot gnu.org
2024-04-30 1:14 ` cvs-commit at gcc dot gnu.org
2024-04-30 1:21 ` cvs-commit at gcc dot gnu.org
2024-04-30 1:21 ` ppalka 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-114888-4-SeL0NIXe0Z@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).