]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add EAF_NOREAD check to tree-ssa-uninit
authorJan Hubicka <jh@suse.cz>
Wed, 18 Aug 2021 11:25:28 +0000 (13:25 +0200)
committerJan Hubicka <jh@suse.cz>
Wed, 18 Aug 2021 11:26:52 +0000 (13:26 +0200)
gcc/ChangeLog:

2021-08-18  Jan Hubicka  <hubicka@ucw.cz>

* tree-ssa-uninit.c (maybe_warn_pass_by_reference): Check also
EAF_NOREAD.

gcc/tree-ssa-uninit.c

index d5cdffbae8bf5e362a609204960ec712c8c0a982..ad2cf48819b3abbca9f0d925e98ad4d90c9b666f 100644 (file)
@@ -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);