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: RFC: add inheritance support to nonoverlapping_component_refs_p


On Wed, Apr 03, 2002 at 02:14:11PM -0800, Dan Nicolaescu wrote:
> 	* alias.c (nonoverlapping_component_refs_p): Look for fields in
> 	BINFOs too. 

The patch is incomplete.  You need to recursively search base
classes.  For example, your patch will fail the attached test.

Incidentally, this is the sort of test cases you should be
writing to accompany your aliasing patches.  If the aliasing
works as designed, the compiler can prove some property and
simplify a conditional at compile-time.

I think the attached patch will do what you want.  I've only
tested it on the given test case.  It needs something more
thorough before being checked in.  Since you have an interest,
would you mind doing that?  You might also see if you can 
re-factor it a bit to ensure tail-recursion elimination in
some cases, and/or hoist controling expressions into callers.


r~

Attachment: z.c
Description: Text document

Attachment: z
Description: Text document


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