This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/85257] [6/7 Regression] wrong code with -O -fno-tree-ccp and reading zeroed vector member


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]