public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "nathan at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/24053] [4.1 Regression] Ada bootstrap ICE in build_int_cst_wide, at tree.c:795
Date: Tue, 27 Sep 2005 10:51:00 -0000 [thread overview]
Message-ID: <20050927105111.6195.qmail@sourceware.org> (raw)
In-Reply-To: <20050925101726.24053.laurent@guerby.net>
------- Additional Comments From nathan at codesourcery dot com 2005-09-27 10:51 -------
Subject: Re: [4.1 Regression] Ada bootstrap ICE in
build_int_cst_wide, at tree.c:795
ebotcazou at gcc dot gnu dot org wrote:
> In build_int_cst_wide, we're asserting that the type of shared constants
> attached to a type is precisely that type:
>
> t = TREE_VEC_ELT (TYPE_CACHED_VALUES (type), ix);
> if (t)
> {
> /* Make sure no one is clobbering the shared constant. */
> gcc_assert (TREE_TYPE (t) == type);
>
> But in set_sizetype we're boldly copying TYPE_CACHED_VALUES between types:
>
> /* We do want to use bitsizetype's cache, as we will be replacing that
> type. */
> TYPE_CACHED_VALUES (t) = TYPE_CACHED_VALUES (bitsizetype);
> TYPE_CACHED_VALUES_P (t) = TYPE_CACHED_VALUES_P (bitsizetype);
>
>
> Nathan, who is right here?
Both are correct. However it looks like some integer constant created before
set_sizetype is called has not got its type updated correctly.
The problem here is that we have to create some types before setting size_type,
and in creating those types we need to set their size to some integral constant,
and that integral constant has to have a type. That uses the stub sizetype
type, which we overwrite further down set_sizetype.
/* Replace our original stub sizetype. */
memcpy (sizetype, t, tree_size (sizetype));
TYPE_MAIN_VARIANT (sizetype) = sizetype;
My guess is that we've already created some type variants of the stub type at
that point, which is not what I expected. There should really be an
gcc_assert (!TYPE_NEXT_VARIANT (sizetype) && !TYPE_NEXT_VARIANT (t));
just before the memcpy
nathan
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24053
next prev parent reply other threads:[~2005-09-27 10:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-25 10:17 [Bug bootstrap/24053] New: " laurent at guerby dot net
2005-09-25 10:54 ` [Bug bootstrap/24053] " schwab at suse dot de
2005-09-25 15:17 ` [Bug ada/24053] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-09-25 17:20 ` laurent at guerby dot net
2005-09-25 17:55 ` danglin at gcc dot gnu dot org
2005-09-25 18:15 ` ebotcazou at gcc dot gnu dot org
2005-09-26 16:56 ` ebotcazou at gcc dot gnu dot org
2005-09-27 9:55 ` [Bug middle-end/24053] " ebotcazou at gcc dot gnu dot org
2005-09-27 10:51 ` nathan at codesourcery dot com [this message]
2005-09-29 11:54 ` christian dot joensson at gmail dot com
2005-09-29 17:24 ` ebotcazou at gcc dot gnu dot org
2005-09-29 21:33 ` chrisp_42 at bigpond dot com
2005-09-29 22:11 ` cvs-commit at gcc dot gnu dot org
2005-09-29 22:14 ` [Bug middle-end/24053] [4.1 Regression] " ebotcazou at gcc dot gnu dot 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=20050927105111.6195.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).