It's not exercised but I ran into this with trying PRE after
IVOPTs.

Committed as obvious.

Richard.

2019-10-17  Richard Biener  <rguent...@suse.de>

        * tree-ssa-pre.c (create_component_ref_by_pieces_1): Fix
        TARGET_MEM_REF creation.

Index: gcc/tree-ssa-pre.c
===================================================================
--- gcc/tree-ssa-pre.c  (revision 277094)
+++ gcc/tree-ssa-pre.c  (working copy)
@@ -2492,7 +2492,7 @@ create_component_ref_by_pieces_1 (basic_
     case TARGET_MEM_REF:
       {
        tree genop0 = NULL_TREE, genop1 = NULL_TREE;
-       vn_reference_op_t nextop = &ref->operands[++*operand];
+       vn_reference_op_t nextop = &ref->operands[(*operand)++];
        tree baseop = create_component_ref_by_pieces_1 (block, ref, operand,
                                                        stmts);
        if (!baseop)

Reply via email to