This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [Ada] Bootstrapping mainline GNAT fails
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Robert Dewar <dewar at gnat dot com>
- Cc: gcc at gcc dot gnu dot org, kenner at vlsi1 dot ultra dot nyu dot edu
- Date: Mon, 18 Mar 2002 18:57:27 -0800
- Subject: Re: [Ada] Bootstrapping mainline GNAT fails
- References: <20020319021456.80511F28D2@nile.gnat.com>
On Mon, Mar 18, 2002 at 09:14:56PM -0500, Robert Dewar wrote:
> <<Do those nodes look correct to you? Off the top of my head I'm a
> little dubious about having the Etype field of a string literal point
> at a Defining_Identifier -- shouldn't it be some sort of type node?
> >>
>
> All this is documented completely in the einfo unit, a defining
> identifier IS a type in Ada
Aha, I was looking in the wrong place (sinfo).
> It's really hard to guess what is going on here. Especially since we
> don't duplicate this bomb. I wonder what is different about your
> setup and ours?
What architecture are you doing your builds-from-3.14 with? I suspect
we have two separate bugs:
1) The assertion is thrown because this statement
Ind : constant Node_Id := First_Index (Etype (Arr));
sets Ind to 0. Arr is a N_String_Literal node; I *think* the Etype
of a String_Literal is not supposed to have a First_Index (the
String_Literal_Low_Bound plays more or less the same role). Please
correct me if I'm wrong there. Basically, Constant_Array_Ref is
not prepared to handle string literals.
2) That bug is being masked by the exception clause on
Compile_Time_Known_Value, which simply returns False if any
exception is caught while attempting to examine its argument. On a
platform where exceptions work, that's great. However, 3.14p
(apparently) has bugs in exception handling on i486-linux; the
generated code jumps to an uninitialized pointer and crashes.
Fix (1) and (2) will cease to be an issue. Lemme see if I can hack up
Constant_Array_Ref to support string literals.
Incidentally, have you considered replacing the exception thrower
linked into gnat1 with a stub that calls the back-end's fatal_error()?
(which you can then hook to display the bug box) That would insulate
us from all bugs in the bootstrap compiler having to do with exception
handling, which has historically been a problem, and you would need a
bit less of the runtime library.
zw