[Bug tree-optimization/22488] [4.1 Regression] push_fields_onto_fieldstack calculates offset incorrectly
jason at redhat dot com
gcc-bugzilla@gcc.gnu.org
Wed Sep 28 19:39:00 GMT 2005
------- Additional Comments From jason at redhat dot com 2005-09-28 19:39 -------
Subject: Re: [4.1 Regression] push_fields_onto_fieldstack
calculates offset incorrectly
mmitchel at gcc dot gnu dot org wrote:
> I think this is a hack so that later, when we use the COMPONENT_REFs, we don't
> have to cast from the as-base type back to the nominal C++ type. (Of course,
> this would also be cleaner with a real C++-lowering pass.)
>
> However, I think the right thing is to have the cast; as you've discovered,
> Jason's approach is lying about what's really there. Jason?
My intent was to use COMPONENT_REFs where it's close enough to the
truth, and casts where it isn't. The middle/back end produced
significantly better code for COMPONENT_REFs than casts when I made the
change, particularly with aliasing; I'm not sure if it's gotten any
better since then.
And besides, my approach isn't lying at all about this testcase; since
there's only one appearance of the virtual base, it appears exactly
where the field lists say it will. Daniel agreed that the problem is in
his code.
Jason
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22488
More information about the Gcc-bugs
mailing list