This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix more of C/fortran canonical type issues
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, <gcc-patches at gcc dot gnu dot org>, <burnus at net-b dot de>
- Date: Mon, 8 Jun 2015 14:32:23 +0000
- Subject: Re: Fix more of C/fortran canonical type issues
- Authentication-results: sourceware.org; auth=none
- References: <20150608001957 dot GA35779 at kam dot mff dot cuni dot cz> <20150608050047 dot GA10381 at kam dot mff dot cuni dot cz> <20150608054500 dot GA58209 at kam dot mff dot cuni dot cz> <alpine dot LSU dot 2 dot 11 dot 1506081536560 dot 30088 at zhemvz dot fhfr dot qr> <alpine dot DEB dot 2 dot 10 dot 1506081354460 dot 25225 at digraph dot polyomino dot org dot uk> <alpine dot LSU dot 2 dot 11 dot 1506081608030 dot 30088 at zhemvz dot fhfr dot qr>
On Mon, 8 Jun 2015, Richard Biener wrote:
> On Mon, 8 Jun 2015, Joseph Myers wrote:
>
> > On Mon, 8 Jun 2015, Richard Biener wrote:
> >
> > > I'm not sure the C standard mandates compatibility between
> > >
> > > struct { int i; } and struct { unsigned i; } for purposes of TBAA.
> > > Joseph?
> >
> > I don't think they are necessarily compatible for TBAA.
>
> Ok, but as int and unsigned are reading either structs element
> via a pointer to int or a pointer to unsigned must be supported?
Yes. The questionable case would be taking an object of one of those
structure types, casting a pointer to it to point to the other structure
type and then dereferencing.
--
Joseph S. Myers
joseph@codesourcery.com