From: Jan Hubicka Date: Wed, 18 Aug 2021 11:25:28 +0000 (+0200) Subject: Add EAF_NOREAD check to tree-ssa-uninit X-Git-Tag: basepoints/gcc-13~5325 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e12946df34c997e96c3bc7eb5a0247e889ddb7ea;p=thirdparty%2Fgcc.git Add EAF_NOREAD check to tree-ssa-uninit gcc/ChangeLog: 2021-08-18 Jan Hubicka * tree-ssa-uninit.c (maybe_warn_pass_by_reference): Check also EAF_NOREAD. --- diff --git a/gcc/tree-ssa-uninit.c b/gcc/tree-ssa-uninit.c index d5cdffbae8bf..ad2cf48819b3 100644 --- a/gcc/tree-ssa-uninit.c +++ b/gcc/tree-ssa-uninit.c @@ -712,7 +712,7 @@ maybe_warn_pass_by_reference (gcall *stmt, wlimits &wlims) wlims.always_executed = false; /* Ignore args we are not going to read from. */ - if (gimple_call_arg_flags (stmt, argno - 1) & EAF_UNUSED) + if (gimple_call_arg_flags (stmt, argno - 1) & (EAF_UNUSED | EAF_NOREAD)) continue; tree arg = gimple_call_arg (stmt, argno - 1);