aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.h
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2024-06-13 13:07:10 -0700
committerAndrew Pinski <quic_apinski@quicinc.com>2024-06-13 20:10:53 -0700
commitd8a6de9e2b850b71712e89e8e6026e4ae6284766 (patch)
tree187772fe33cdb7733e35c52d99a1f107e7da29e8 /gcc/optabs.h
parent028cd77db322d21312680c9a0a7c30565854f577 (diff)
downloadgcc-d8a6de9e2b850b71712e89e8e6026e4ae6284766.zip
gcc-d8a6de9e2b850b71712e89e8e6026e4ae6284766.tar.gz
gcc-d8a6de9e2b850b71712e89e8e6026e4ae6284766.tar.bz2
expand: constify sepops operand to expand_expr_real_2 and expand_widen_pattern_expr [PR113212]
While working on an expand patch back in January I noticed that the first argument (of sepops type) of expand_expr_real_2 could be constified as it was not to be touched by the function (nor should it be). There is code in internal-fn.cc that depends on expand_expr_real_2 not touching the ops argument so constification makes this more obvious. Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: PR middle-end/113212 * expr.h (const_seqpops): New typedef. (expand_expr_real_2): Constify the first argument. * optabs.cc (expand_widen_pattern_expr): Likewise. * optabs.h (expand_widen_pattern_expr): Likewise. * expr.cc (expand_expr_real_2): Likewise (do_store_flag): Likewise. Remove incorrect store to ops->code. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc/optabs.h')
-rw-r--r--gcc/optabs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/optabs.h b/gcc/optabs.h
index c0b8df5..301847e 100644
--- a/gcc/optabs.h
+++ b/gcc/optabs.h
@@ -182,7 +182,7 @@ enum optab_methods
OPTAB_MUST_WIDEN
};
-extern rtx expand_widen_pattern_expr (struct separate_ops *, rtx , rtx , rtx,
+extern rtx expand_widen_pattern_expr (const struct separate_ops *, rtx , rtx , rtx,
rtx, int);
extern rtx expand_ternary_op (machine_mode mode, optab ternary_optab,
rtx op0, rtx op1, rtx op2, rtx target,