[gcc r14-6183] ipa/92606 - IPA ICF merging variables in different address-space
Richard Biener
rguenth@gcc.gnu.org
Tue Dec 5 13:59:09 GMT 2023
https://gcc.gnu.org/g:1e6c4aa47972d6b56225e7776f3cf41f2cc01da2
commit r14-6183-g1e6c4aa47972d6b56225e7776f3cf41f2cc01da2
Author: Richard Biener <rguenther@suse.de>
Date: Tue Dec 5 13:56:10 2023 +0100
ipa/92606 - IPA ICF merging variables in different address-space
The following aovids merging variables that are put in different
address-spaces.
PR ipa/92606
* ipa-icf.cc (sem_variable::equals_wpa): Compare address-spaces.
Diff:
---
gcc/ipa-icf.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/ipa-icf.cc b/gcc/ipa-icf.cc
index c72c9d57a80..81232d5706e 100644
--- a/gcc/ipa-icf.cc
+++ b/gcc/ipa-icf.cc
@@ -1666,6 +1666,10 @@ sem_variable::equals_wpa (sem_item *item,
if (DECL_IN_TEXT_SECTION (decl) != DECL_IN_TEXT_SECTION (item->decl))
return return_false_with_msg ("text section");
+ if (TYPE_ADDR_SPACE (TREE_TYPE (decl))
+ != TYPE_ADDR_SPACE (TREE_TYPE (item->decl)))
+ return return_false_with_msg ("address-space");
+
ipa_ref *ref = NULL, *ref2 = NULL;
for (unsigned i = 0; node->iterate_reference (i, ref); i++)
{
More information about the Gcc-cvs
mailing list