This is the mail archive of the gcc@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: enable-build-with-cxx bootstrap compare broken by r149964


On 08/21/2009 02:37 PM, Jerry Quinn wrote:
OK, I've gotten almost this far and can bootstrap (the asterisk is
actually not the very first char and I have to figure that out).
However, in the referenced test case, both typeinfos are apparently
merged, thus returning the same pointer for their name strings, so
pointer comparison still wouldn't work.

Therefore, I guess I'll need to do the following:

   You might also need to take steps to ensure that the typeinfo gets emitted
as non-COMDAT with local symbols, so that each object does indeed end up with
its own separate copy.

Where should I look to do this?

First thing you should do is make sure you're emitting a VAR_DECL with the string contents, rather than a STRING_CST constant. The later will be merged within an object file within the compiler.

Second, make sure the VAR_DECL for the typeinfo is no DECL_ONE_ONLY.
That flag sets up COMDAT sections, which will be merged by the linker.


r~



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