[Bug middle-end/58941] [4.7/4.8/4.9 Regression] MIPS: value modification on zero-length array optimized away

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Nov 5 13:26:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58941

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Tue Nov  5 13:24:13 2013
New Revision: 204391

URL: http://gcc.gnu.org/viewcvs?rev=204391&root=gcc&view=rev
Log:
2013-11-05  Richard Biener  <rguenther@suse.de>

    PR middle-end/58941
    * tree-dfa.c (get_ref_base_and_extent): Merge common code
    in MEM_REF and TARGET_MEM_REF handling.  Make sure to
    process trailing array detection before diving into the
    view-converted object (and possibly apply some extra offset).

    * gcc.dg/torture/pr58941.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr58941.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-dfa.c



More information about the Gcc-bugs mailing list