This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/22488] [4.1 Regression] push_fields_onto_fieldstack calculates offset incorrectly
- From: "mark at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Oct 2005 15:28:15 -0000
- Subject: [Bug tree-optimization/22488] [4.1 Regression] push_fields_onto_fieldstack calculates offset incorrectly
- References: <bug-22488-7559@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #41 from mark at codesourcery dot com 2005-10-04 15:28 -------
Subject: Re: [4.1 Regression] push_fields_onto_fieldstack
calculates offset incorrectly
rguenth at gcc dot gnu dot org wrote:
> ------- Comment #40 from rguenth at gcc dot gnu dot org 2005-10-04 15:12 -------
> (In reply to comment #38)
>
>>As a 4.1 kludge, i can make the points-to analyzer do what it does for unions,
>>which is to glob everything to a single variable for those classes where it has
>>found two fields it thinks overlap.
>>
>>This will lose alias precision, but it won't be worse than what 4.0 was.
>
>
> Yes please. This bug really annoys me ;)
I agree that this is a reasonable solution. In fact, if you see
conflicting field types for some chunk of memory, I don't think it would
necessarily be unreasonable to just say that the whole object has some
unknown-type alias information. C++ should provide an accurate
representation of multiple inheritance to the middle-end; if it doesn't,
it gets what it deserves, but it would be nice if programs still worked.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22488