This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/81884] [6 Regression] Invalid code generation with zero size arrays or flexible array members
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 28 Aug 2017 12:16:41 +0000
- Subject: [Bug tree-optimization/81884] [6 Regression] Invalid code generation with zero size arrays or flexible array members
- Auto-submitted: auto-generated
- References: <bug-81884-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81884
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Mon Aug 28 12:16:06 2017
New Revision: 251379
URL: https://gcc.gnu.org/viewcvs?rev=251379&root=gcc&view=rev
Log:
2017-08-28 Richard Biener <rguenther@suse.de>
Backport from mainline
2017-08-21 Richard Biener <rguenther@suse.de>
PR middle-end/81884
* tree-ssa-alias.c (stmt_kills_ref_p): Handle array accesses
at struct end conservatively when comparing common bases.
* g++.dg/torture/pr81884.C: New testcase.
2017-05-04 Richard Biener <rguenther@suse.de>
* tree.c (array_at_struct_end_p): Handle arrays at struct
end with flexarrays more conservatively. Refactor and treat
arrays of arrays or aggregates more strict. Fix
VIEW_CONVERT_EXPR handling. Remove allow_compref argument.
* tree.h (array_at_struct_end_p): Adjust prototype.
* gimple-fold.c (get_range_strlen): Likewise.
* tree-chkp.c (chkp_may_narrow_to_field): Likewise.
Added:
branches/gcc-7-branch/gcc/testsuite/g++.dg/torture/pr81884.C
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/gimple-fold.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/tree-chkp.c
branches/gcc-7-branch/gcc/tree-ssa-alias.c
branches/gcc-7-branch/gcc/tree.c
branches/gcc-7-branch/gcc/tree.h