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: Thu, 21 Jun 2018 07:25:38 +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 #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Thu Jun 21 07:24:06 2018
New Revision: 261833
URL: https://gcc.gnu.org/viewcvs?rev=261833&root=gcc&view=rev
Log:
2018-06-21 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.
2018-04-06 Richard Biener <rguenther@suse.de>
PR middle-end/85244
* tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
after seeing a component reference with an adjacent field. Treat
refs to arrays at struct end of external decls similar to
refs to unconstrained commons.
* gcc.dg/torture/pr85244-1.c: New testcase.
* gcc.dg/torture/pr85244-2.c: Likewise.
* gcc.dg/tree-prof/pr66295.c: Remove unsupported dg-error scanning.
Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/torture/pr81884.C
branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr85244-1.c
branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr85244-2.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/testsuite/ChangeLog
branches/gcc-6-branch/gcc/testsuite/gcc.dg/tree-prof/pr66295.c
branches/gcc-6-branch/gcc/tree-dfa.c
branches/gcc-6-branch/gcc/tree-ssa-alias.c
branches/gcc-6-branch/gcc/tree.c