[r11-5094 Regression] FAIL: gcc.dg/torture/pr8081.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects (test for excess errors) on Linux/x86_64

Jan Hubicka hubicka@ucw.cz
Tue Nov 17 21:13:09 GMT 2020


Hi,
I am testing the following fix.  I manually applied a rejected hunk and
for some reaosn managed to reverse the conditonal :(

Honza

	* ipa-icf.c (sem_function::hash_stmt): Fix conditional on
	variably_modified_type_p.
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);
 	      }
 	  }


More information about the Gcc-patches mailing list