Hi,

with the attached patch the read-side of the out of bounds accesses are fixed.
There is a single new test case pr57748-3.c that is derived from Martin's test 
case.
The test case does only test the read access and does not depend on part 1 of 
the
patch.

This patch was boot-strapped and regression tested on x86_64-unknown-linux-gnu.

Additionally I generated eCos and an eCos-application (on ARMv5 using packed
structures) with an arm-eabi cross compiler, and looked for differences in the
disassembled code with and without this patch, but there were none.

OK for trunk?


Regards
Bernd.                                    
2013-09-24  Bernd Edlinger  <bernd.edlin...@hotmail.de>

        PR middle-end/57748
        * expr.c (expand_expr_real_1): Use EXAND_MEMORY on base object.

testsuite/

        PR middle-end/57748
        * gcc.dg/torture/pr57748-3.c: New test.

Attachment: patch-pr57748-2.diff
Description: Binary data

Reply via email to