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: [C++ PATCH]: Fix 13387


On Mon, 2003-12-15 at 10:23, Nathan Sidwell wrote:
> Mark Mitchell wrote:
> > That only works right if "TYPE_ALIAS_SET (t)" has already been set. 
> > (These things get set lazily.)  I think you should fix cxx_get_alias_set
> > to coordinate the assignment instead.
> > 
> > Does that make sense?
> Yup, good catch. this one ok? booted and tested on i686-pc-linux-gnu.
> 
> nathan
+   if (CLASS_TYPE_P (t) && TYPE_CONTEXT (t) && CLASS_TYPE_P
(TYPE_CONTEXT (t))
+       && CLASSTYPE_AS_BASE (TYPE_CONTEXT (t)) == t)
+     /* The base variant of a type must be in the same alias set as the
+        complete type.  */
+     t = TYPE_CONTEXT (t);

Interesting.  I didn't realize that we put the base-class version inside
the normal version (i.e., set TYPE_CONTEXT in the way that this code
implies.)  As long as we really do that, this patch is fine.

Thanks,


-- 
Mark Mitchell <mark@codesourcery.com>
CodeSourcery, LLC


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