This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/85257] [6/7 Regression] wrong code with -O -fno-tree-ccp and reading zeroed vector member
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 22 Jun 2018 21:09:19 +0000
- Subject: [Bug tree-optimization/85257] [6/7 Regression] wrong code with -O -fno-tree-ccp and reading zeroed vector member
- Auto-submitted: auto-generated
- References: <bug-85257-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85257
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Jun 22 21:08:47 2018
New Revision: 261951
URL: https://gcc.gnu.org/viewcvs?rev=261951&root=gcc&view=rev
Log:
Backported from mainline
2018-04-07 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/85257
* fold-const.c (native_encode_vector): If not all elts could fit
and off is -1, return 0 rather than offset.
* tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
(offset - offset2) / BITS_PER_UNIT as 4th argument to
native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
adjust buffer in native_interpret_expr call.
* gcc.dg/pr85257.c: New test.
Added:
branches/gcc-7-branch/gcc/testsuite/gcc.dg/pr85257.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/fold-const.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/tree-ssa-sccvn.c