From e12946df34c997e96c3bc7eb5a0247e889ddb7ea Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 18 Aug 2021 13:25:28 +0200 Subject: 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. --- gcc/tree-ssa-uninit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-ssa-uninit.c b/gcc/tree-ssa-uninit.c index d5cdffbae8b..ad2cf48819b 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); -- cgit v1.2.1