This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, PR 57748] Check for out of bounds access
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Richard Biener <richard dot guenther at gmail dot com>, Martin Jambor <mjambor at suse dot cz>
- Date: Fri, 13 Sep 2013 11:16:23 +0200
- Subject: Re: [PATCH, PR 57748] Check for out of bounds access
- Authentication-results: sourceware.org; auth=none
- References: <DUB122-W396D54115D70C9FF68A8D2E43C0 at phx dot gbl> <CAFiYyc3AHggjJbEmZvC_fh67o+LVpTBRdwyUv8T6EhQFE2vNWQ at mail dot gmail dot com> <DUB122-W42965752B12A2C1F92B584E43A0 at phx dot gbl>
> While it is straight forward to remove the movmisalign path in 4.9 and 4.8,
> this is not so simple in the 4.7 branch. The reason is that 4.7 uses
> "to_rtx = expand_normal (tem);" while 4.8 and 4.9 use
> "to_rtx = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_WRITE);"
> which does almost the same, but returns the misaligned rtx instead of
> an register with the value of the structure. And the generated code without
> the misalign path fails simply because the assignment goes to the register
> instead of the structure.
> So the problem is: there is no EXPAND_WRITE/EXPAND_MEMORY in 4.7...
> A possible patch for 4.7 would be like the attached (untested) patch.
Let's simply declare this as WONTFIX on the 4.7 branch.