This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]