objc.dg/const-str-1.m regression

Stan Shebs shebs@apple.com
Tue Dec 11 17:34:00 GMT 2001


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.

Stan



More information about the Gcc-patches mailing list