Re: [V5] [C PATCH 3/4] c23: aliasing of compatible tagged types

2023-12-19 Thread Joseph Myers
On Sun, 17 Dec 2023, Martin Uecker wrote: > +/* While tese tests check that incompatible definitions > + * of enums can alias. */ s/tese/these/ Patch 3 is OK with that fix. -- Joseph S. Myers jos...@codesourcery.com

[V5] [C PATCH 3/4] c23: aliasing of compatible tagged types

2023-12-17 Thread Martin Uecker
Tell the backend which types are equivalent by setting TYPE_CANONICAL to one struct in the set of equivalent structs. Structs are considered equivalent by ignoring all sizes of arrays nested in types below field level. The following two structs are incompatible and lvalues with these types

Re: [V4] [PATCH 3/4] c23: aliasing of compatible tagged types

2023-12-14 Thread Joseph Myers
On Mon, 27 Nov 2023, Martin Uecker wrote: > diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h > index a5dd9a37944..ece5b6a5d26 100644 > --- a/gcc/c/c-tree.h > +++ b/gcc/c/c-tree.h > @@ -758,6 +758,7 @@ extern tree require_complete_type (location_t, tree); > extern bool same_translation_unit_p

Re: [PATCH 3/4] c23: aliasing of compatible tagged types

2023-11-28 Thread Martin Uecker
Am Dienstag, dem 28.11.2023 um 10:47 + schrieb Richard Biener: > On Tue, 28 Nov 2023, Joseph Myers wrote: > > > On Sun, 26 Nov 2023, Martin Uecker wrote: > > > > > > > I also think more rationale is needed for ignoring sizes like this. Is > > > > it > > > > intended for e.g. making

Re: [PATCH 3/4] c23: aliasing of compatible tagged types

2023-11-28 Thread Richard Biener
On Tue, 28 Nov 2023, Joseph Myers wrote: > On Sun, 26 Nov 2023, Martin Uecker wrote: > > > My understand is that it is used for aliasing analysis and also > > checking of conversions. TYPE_CANONICAL must be consistent with > > the idea the middle-end has about type conversions. But as long > >

Re: [PATCH 3/4] c23: aliasing of compatible tagged types

2023-11-27 Thread Martin Uecker
Am Dienstag, dem 28.11.2023 um 01:00 + schrieb Joseph Myers: > On Sun, 26 Nov 2023, Martin Uecker wrote: > > > My understand is that it is used for aliasing analysis and also > > checking of conversions. TYPE_CANONICAL must be consistent with > > the idea the middle-end has about type

Re: [PATCH 3/4] c23: aliasing of compatible tagged types

2023-11-27 Thread Joseph Myers
On Sun, 26 Nov 2023, Martin Uecker wrote: > My understand is that it is used for aliasing analysis and also > checking of conversions. TYPE_CANONICAL must be consistent with > the idea the middle-end has about type conversions. But as long > as we do not give the same TYPE_CANONICAL to types

[V4] [PATCH 3/4] c23: aliasing of compatible tagged types

2023-11-27 Thread Martin Uecker
(this mostly got an extended description and more comments, also tests were reorganized) c23: aliasing of compatible tagged types Tell the backend which types are equivalent by setting TYPE_CANONICAL to one struct in the set of equivalent structs. Structs are considered equivalent by

Re: [PATCH 3/4] c23: aliasing of compatible tagged types

2023-11-26 Thread Richard Biener
On Sun, 26 Nov 2023, Martin Uecker wrote: > > Thanks Joseph, I will sent an updated series tomorrow. > > Richard, maybe you could look at what I wrote below > about my use of TYPE_CANONICAL ? Does this make sense? > > > Am Donnerstag, dem 23.11.2023 um 23:47 + schrieb Joseph Myers: > >

Re: [PATCH 3/4] c23: aliasing of compatible tagged types

2023-11-26 Thread Martin Uecker
Thanks Joseph, I will sent an updated series tomorrow. Richard, maybe you could look at what I wrote below about my use of TYPE_CANONICAL ? Does this make sense? Am Donnerstag, dem 23.11.2023 um 23:47 + schrieb Joseph Myers: > On Thu, 16 Nov 2023, Martin Uecker wrote: > > > Tell the

Re: [PATCH 3/4] c23: aliasing of compatible tagged types

2023-11-23 Thread Joseph Myers
On Thu, 16 Nov 2023, Martin Uecker wrote: > Tell the backend which types are equivalent by setting > TYPE_CANONICAL to one struct in the set of equivalent > structs. Structs are considered equivalent by ignoring > all sizes of arrays nested in types below field level. Is TYPE_CANONICAL *only*

[PATCH 3/4] c23: aliasing of compatible tagged types

2023-11-16 Thread Martin Uecker
Tell the backend which types are equivalent by setting TYPE_CANONICAL to one struct in the set of equivalent structs. Structs are considered equivalent by ignoring all sizes of arrays nested in types below field level. gcc/c: * c-decl.cc (c_struct_hasher): Hash stable for struct