Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gcc/dist/gcc Pull in https://gcc.gnu.org/g:3d9...



details:   https://anonhg.NetBSD.org/src/rev/bded14f6d141
branches:  trunk
changeset: 1008995:bded14f6d141
user:      wiz <wiz%NetBSD.org@localhost>
date:      Wed Apr 08 06:49:28 2020 +0000

description:
Pull in https://gcc.gnu.org/g:3d947f1f27188e3a61ba7f42399b1c348469fe13

    middle-end/94479 - fix gimplification of address

    When gimplifying an address operand we may expose an indirect
    ref via DECL_VALUE_EXPR for example.  This is dealt with in the
    code already but it fails to consider that INDIRECT_REFs get
    gimplified to MEM_REFs.

    Fixed which makes the ICE observed on x86_64-netbsd go away.

    2020-04-07  Richard Biener  <rguenther%suse.de@localhost>

            PR middle-end/94479
            * gimplify.c (gimplify_addr_expr): Also consider generated
            MEM_REFs.

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

Fixes -fstack-check ICE when building devel/git-base.

diffstat:

 external/gpl3/gcc/dist/gcc/gimplify.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r 9aab900b526d -r bded14f6d141 external/gpl3/gcc/dist/gcc/gimplify.c
--- a/external/gpl3/gcc/dist/gcc/gimplify.c     Wed Apr 08 04:32:14 2020 +0000
+++ b/external/gpl3/gcc/dist/gcc/gimplify.c     Wed Apr 08 06:49:28 2020 +0000
@@ -6072,7 +6072,9 @@
 
       /* For various reasons, the gimplification of the expression
         may have made a new INDIRECT_REF.  */
-      if (TREE_CODE (op0) == INDIRECT_REF)
+      if (TREE_CODE (op0) == INDIRECT_REF
+         || (TREE_CODE (op0) == MEM_REF
+             && integer_zerop (TREE_OPERAND (op0, 1))))
        goto do_indirect_ref;
 
       mark_addressable (TREE_OPERAND (expr, 0));



Home | Main Index | Thread Index | Old Index