On Wed, Feb 17, 2021 at 02:38:04PM -0700, Martin Sebor wrote:
> How does build_printable_array_type sound?
I'll go with that.
> Also, would using TYPE_MAIN_VARIANT whenever TYPE_USER_ALIGN is set
> be a simpler solution? (It might not be as refined as the test in
> your patch but I don't think w
On 2/17/21 1:56 PM, Jakub Jelinek wrote:
On Wed, Feb 17, 2021 at 01:38:56PM -0700, Martin Sebor wrote:
- reftype = build_array_type_nelts (reftype, 1);
+ {
+ if (overaligned_type_p (reftype))
+ reftype = TYPE_MAIN_VARIANT (reftype);
+ reftype = build_array_t
On Wed, Feb 17, 2021 at 01:38:56PM -0700, Martin Sebor wrote:
> > - reftype = build_array_type_nelts (reftype, 1);
> > + {
> > + if (overaligned_type_p (reftype))
> > + reftype = TYPE_MAIN_VARIANT (reftype);
> > + reftype = build_array_type_nelts (reftype, 1);
> > + }
>
> Rathe
On 2/17/21 3:12 AM, Jakub Jelinek via Gcc-patches wrote:
Hi!
check_mem_ref builds artificial arrays for variables that don't have
array type.
The C standard says:
"For the purposes of these operators, a pointer to an object that is not an
element of an
array behaves the same as a pointer to the
Hi!
check_mem_ref builds artificial arrays for variables that don't have
array type.
The C standard says:
"For the purposes of these operators, a pointer to an object that is not an
element of an
array behaves the same as a pointer to the first element of an array of length
one with the
type of