Re: [PATCH] Fix LTO type mismatch warning on transparent union

2024-05-30 Thread Richard Biener
> Am 30.05.2024 um 13:46 schrieb Eric Botcazou : > >  >> >> Do function pointers inter-operate TBAA wise for this case and would this >> possibly An issue? > > Do you mean in LTO mode? I must say I'm not sure of the way LTO performs TBAA > for function pointers: does it require (strict) mat

Re: [PATCH] Fix LTO type mismatch warning on transparent union

2024-05-30 Thread Eric Botcazou
> Do function pointers inter-operate TBAA wise for this case and would this > possibly An issue? Do you mean in LTO mode? I must say I'm not sure of the way LTO performs TBAA for function pointers: does it require (strict) matching of the type for all the parameters of the pointed-to function t

Re: [PATCH] Fix LTO type mismatch warning on transparent union

2024-05-29 Thread Richard Biener
> Am 29.05.2024 um 15:30 schrieb Eric Botcazou : > > Hi, > > Ada doesn't have an equivalent to transparent union types in GNU C so, when it > needs to interface a C function that takes a parameter of a transparent union > type, GNAT uses the type of the first member of the union on the Ada si

[PATCH] Fix LTO type mismatch warning on transparent union

2024-05-29 Thread Eric Botcazou
Hi, Ada doesn't have an equivalent to transparent union types in GNU C so, when it needs to interface a C function that takes a parameter of a transparent union type, GNAT uses the type of the first member of the union on the Ada side (which is the type used to determine the passing mechanism o