public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "law at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/18968] [4.0 regression] ICE: tree check: expected ssa_name, have addr_expr in vrp_hash
Date: Tue, 14 Dec 2004 00:42:00 -0000 [thread overview]
Message-ID: <20041214004235.5489.qmail@sourceware.org> (raw)
In-Reply-To: <20041213212814.18968.schwab@suse.de>
------- Additional Comments From law at redhat dot com 2004-12-14 00:42 -------
Subject: Re: [4.0 regression] ICE: tree check: expected
ssa_name, have addr_expr in vrp_hash
On Mon, 2004-12-13 at 23:18 +0000, pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-13 23:18 -------
> (In reply to comment #7)
> > Subject: Re: [4.0 regression] ICE: tree
> > check: expected ssa_name, have addr_expr in vrp_hash
> >
> > So what does the condition look like? I don't think we should be
> > getting into this code with anything other than an SSA_NAME as
> > the first argument in a COND_EXPR.
> Sorry about that, I was still working through the code of DOM.
>
> The condition looks like &0B->a == 0 which means that the 0 is an integer but other size of the equal
> expression is a pointer. This means that the types are mismatched by the front-end.
> This patch is the correct fix which fixes the problem in the front-end which fixes the mismatched types:
> Index: class.c
> ===============================================================
> ====
> RCS file: /cvs/gcc/gcc/gcc/cp/class.c,v
> retrieving revision 1.692
> diff -u -p -r1.692 class.c
> --- class.c 8 Dec 2004 08:35:33 -0000 1.692
> +++ class.c 13 Dec 2004 23:12:29 -0000
> @@ -295,8 +295,11 @@ build_base_path (enum tree_code code,
>
> /* Now that we've saved expr, build the real null test. */
> if (null_test)
> - null_test = fold (build2 (NE_EXPR, boolean_type_node,
> - expr, integer_zero_node));
> + {
> + tree zero = cp_convert (TREE_TYPE (expr), integer_zero_node);
> + null_test = fold (build2 (NE_EXPR, boolean_type_node,
> + expr, zero));
> + }
>
> /* If this is a simple base reference, express it as a COMPONENT_REF. */
> if (code == PLUS_EXPR && !virtual_access
Looks pretty reasonable to me. Assuming it passes a regression test
consider it pre-approved along with a suitable entry for the testsuite.
Thanks,
jeff
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18968
next prev parent reply other threads:[~2004-12-14 0:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-13 21:28 [Bug middle-end/18968] New: " schwab at suse dot de
2004-12-13 21:30 ` [Bug middle-end/18968] " schwab at suse dot de
2004-12-13 21:30 ` [Bug tree-optimization/18968] " pinskia at gcc dot gnu dot org
2004-12-13 21:32 ` pinskia at gcc dot gnu dot org
2004-12-13 22:17 ` reichelt at gcc dot gnu dot org
2004-12-13 22:22 ` pinskia at gcc dot gnu dot org
2004-12-13 22:38 ` pinskia at gcc dot gnu dot org
2004-12-13 22:53 ` [Bug c++/18968] " pinskia at gcc dot gnu dot org
2004-12-13 22:54 ` reichelt at gcc dot gnu dot org
2004-12-13 23:00 ` law at redhat dot com
2004-12-13 23:18 ` pinskia at gcc dot gnu dot org
2004-12-13 23:50 ` pinskia at gcc dot gnu dot org
2004-12-14 0:38 ` law at redhat dot com
2004-12-14 0:42 ` law at redhat dot com [this message]
2004-12-14 2:22 ` cvs-commit at gcc dot gnu dot org
2004-12-14 2:22 ` pinskia at gcc dot gnu dot org
2005-02-17 17:05 ` gj at pointblue dot com dot pl
2005-02-17 17:48 ` pinskia at gcc dot gnu dot org
2005-02-17 17:57 ` gj at pointblue dot com dot pl
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=20041214004235.5489.qmail@sourceware.org \
--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).