Fix ipa-icf ICE on variadic types
authorJan Hubicka <jh@suse.cz>
Tue, 17 Nov 2020 21:55:42 +0000 (22:55 +0100)
committerJan Hubicka <jh@suse.cz>
Tue, 17 Nov 2020 21:56:29 +0000 (22:56 +0100)
* ipa-icf.c (sem_function::hash_stmt): Fix conditional on
variably_modified_type_p.

gcc/ipa-icf.c

index 27eeda3..6ae8427 100644 (file)
@@ -1459,10 +1459,10 @@ sem_function::hash_stmt (gimple *stmt, inchash::hash &hstate)
 
                ao_ref_init (&ref, gimple_op (stmt, i));
                tree t = ao_ref_alias_ptr_type (&ref);
-               if (variably_modified_type_p (t, NULL_TREE))
+               if (!variably_modified_type_p (t, NULL_TREE))
                  memory_access_types.safe_push (t);
                t = ao_ref_base_alias_ptr_type (&ref);
-               if (variably_modified_type_p (t, NULL_TREE))
+               if (!variably_modified_type_p (t, NULL_TREE))
                  memory_access_types.safe_push (t);
              }
          }