[PATCH] tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]

2020-04-29 Thread Marek Polacek via Gcc-patches
Here we trip on the TYPE_USER_ALIGN (t) assert in strip_typedefs: it gets "const d[0]" with TYPE_USER_ALIGN=0 but the result built by build_cplus_array_type is "const char[0]" with TYPE_USER_ALIGN=1. When we strip_typedefs the element of the array "const d", we see it's a typedef_variant_p, so we

[PATCH] tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]

2021-01-28 Thread Marek Polacek via Gcc-patches
A year ago I submitted this patch: ~~ Here we trip on the TYPE_USER_ALIGN (t) assert in strip_typedefs: it gets "const d[0]" with TYPE_USER_ALIGN=0 but the result built by build_cplus_array_type is "const char[0]" with TYPE_USER_ALIGN=1. When we strip_typedefs the element of the array "const d",

Re: [PATCH] tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]

2020-04-29 Thread Richard Biener via Gcc-patches
On Wed, Apr 29, 2020 at 11:43 PM Marek Polacek via Gcc-patches wrote: > > Here we trip on the TYPE_USER_ALIGN (t) assert in strip_typedefs: it > gets "const d[0]" with TYPE_USER_ALIGN=0 but the result built by > build_cplus_array_type is "const char[0]" with TYPE_USER_ALIGN=1. > > When we strip_ty

Re: [PATCH] tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]

2020-04-30 Thread Marek Polacek via Gcc-patches
On Thu, Apr 30, 2020 at 08:36:32AM +0200, Richard Biener via Gcc-patches wrote: > On Wed, Apr 29, 2020 at 11:43 PM Marek Polacek via Gcc-patches > wrote: > > > > Here we trip on the TYPE_USER_ALIGN (t) assert in strip_typedefs: it > > gets "const d[0]" with TYPE_USER_ALIGN=0 but the result built b

Re: [PATCH] tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]

2021-01-28 Thread Jason Merrill via Gcc-patches
On 1/28/21 10:34 AM, Marek Polacek wrote: A year ago I submitted this patch: ~~ Here we trip on the TYPE_USER_ALIGN (t) assert in strip_typedefs: it gets "const d[0]" with TYPE_USER_ALIGN=0 but the result built by build_cplus_array_type is "const char[0]" with TYPE_USER_ALIGN=1. When we strip_t

Re: [PATCH] tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]

2021-01-28 Thread Marek Polacek via Gcc-patches
On Thu, Jan 28, 2021 at 03:18:55PM -0500, Jason Merrill via Gcc-patches wrote: > On 1/28/21 10:34 AM, Marek Polacek wrote: > > A year ago I submitted this patch: > > > > ~~ > > Here we trip on the TYPE_USER_ALIGN (t) assert in strip_typedefs: it > > gets "const d[0]" with TYPE_USER_ALIGN=0 but the

Re: [PATCH] tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]

2021-01-28 Thread Jason Merrill via Gcc-patches
On 1/28/21 3:36 PM, Marek Polacek wrote: On Thu, Jan 28, 2021 at 03:18:55PM -0500, Jason Merrill via Gcc-patches wrote: On 1/28/21 10:34 AM, Marek Polacek wrote: A year ago I submitted this patch: ~~ Here we trip on the TYPE_USER_ALIGN (t) assert in strip_typedefs: it gets "const d[0]" with TY

Re: [PATCH] tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]

2021-01-28 Thread Eric Botcazou
> Bootstrapped/regtested on > * x86_64-pc-linux-gnu > * powerpc64le-unknown-linux-gnu > * aarch64-linux-gnu > ok for trunk? None of them is strict alignment though, isn't it? -- Eric Botcazou

Re: [PATCH] tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]

2021-01-28 Thread Marek Polacek via Gcc-patches
On Thu, Jan 28, 2021 at 11:02:36PM +0100, Eric Botcazou wrote: > > Bootstrapped/regtested on > > * x86_64-pc-linux-gnu > > * powerpc64le-unknown-linux-gnu > > * aarch64-linux-gnu > > ok for trunk? > > None of them is strict alignment though, isn't it? Aware. I don't have access to, e.g., a sparc

Re: [PATCH] tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]

2021-01-28 Thread Eric Botcazou
> Aware. I don't have access to, e.g., a sparc box. But the test I've added > uses -mstrict-align where possible to check that the issue is resolved. There are relatively fast SPARC64/Linux (gcc202) and SPARC/Solaris machines (gcc210 and gcc211) in the Compile Farm: https://cfarm.tetaneutral.

Re: [PATCH] tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]

2021-01-28 Thread Marek Polacek via Gcc-patches
On Thu, Jan 28, 2021 at 11:38:34PM +0100, Eric Botcazou wrote: > > Aware. I don't have access to, e.g., a sparc box. But the test I've added > > uses -mstrict-align where possible to check that the issue is resolved. > > There are relatively fast SPARC64/Linux (gcc202) and SPARC/Solaris machines