On Mon, 8 Jun 2015, Jan Hubicka wrote: > > 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. > > Are "struct { int i; }" and "struct { unsigned i; }" compatible when one is > defined > in one unit and other in another? > In any cae, I suppose if int and unsigned int pointers can be used > interchangeably, > we want to ignore TYPE_UNSGINED for purposes of canonical type calculation > for LTO. > So is the second variant of patch OK with a comment update that this is also > required > by C?
I think we should instead work towards eliminating the get_alias_set langhook first. The LTO langhook variant contains the same handling, btw, so just inline that into get_alias_set and see what remains? Richard. > Honza > > > > -- > > Joseph S. Myers > > jos...@codesourcery.com > > -- Richard Biener <rguent...@suse.de> SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nuernberg)