From 0c1db9fa47b97ac4f080994e7c4b382b7353e6dd Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Tue, 17 Nov 2020 22:55:42 +0100 Subject: [PATCH] Fix ipa-icf ICE on variadic types * ipa-icf.c (sem_function::hash_stmt): Fix conditional on variably_modified_type_p. --- gcc/ipa-icf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 27eeda3a319..6ae842766e6 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -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); } } -- 2.30.2