This is the mail archive of the
mailing list for the GCC project.
Re: objc.dg/const-str-1.m regression
- From: Stan Shebs <shebs at apple dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 11 Dec 2001 17:34:35 -0800
- Subject: Re: objc.dg/const-str-1.m regression
- References: <200112112235.fBBMZwa07730@maat.cygnus.com> <20011211151338.A24601@redhat.com> <3C1698E2.email@example.com> <20011211171446.A24664@redhat.com>
Richard Henderson wrote:
> > I'd guess that the correct fix is in synth_module_prologue,
> > do a better job of filling in constant_string_type.
> Another possible solution is to skip the casting step in
> build_constructor if there are no fields, since this can
> only happen under error conditions.
> However, this appears to work. Note the comment wrt
> synth_module_prologue vs debugging. Which do you prefer?
It ought to be possible to build the class on demand, so
let's go that way, and fix any consequences as they occur.
Looking at this, it occurred to me why the original code does an
xref_tag; there's not really a guarantee that N[SX]ConstantString
will have any particular fields, except maybe Object, and so the
code was hoping that there would be a definition coming from a
header. This is all kind of bitrotted (testing all this on Darwin
I found a new and different bug, orthogonal to your changes), and
your code is a real improvement, so let's put this in and I'll
do some followup testing.