This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Avoid bugs like PR68273 to trigger
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 08 Feb 2016 11:19:43 +0100
- Subject: Re: [PATCH] Avoid bugs like PR68273 to trigger
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1602081100180 dot 31122 at t29 dot fhfr dot qr>
> This makes it less likely (for example through the PRE path) to trigger
> target bugs like PR68273 where targets use type alignment of call
> arguments to decide on the ABI.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.
Thanks. I think that we can also avoid this issue by teaching SRA not to
over-align scalar types, I don't see any point in doing that. It's done in:
misalign = (misalign + offset) & (align - 1);
if (misalign != 0)
align = (misalign & -misalign);
if (align != TYPE_ALIGN (exp_type))
exp_type = build_aligned_type (exp_type, align);
mem_ref = fold_build2_loc (loc, MEM_REF, exp_type, base, off);
--
Eric Botcazou