33 lines
1.0 KiB
Diff
33 lines
1.0 KiB
Diff
From e7f50fc07c76b60b272cb97151b228d96b67938a Mon Sep 17 00:00:00 2001
|
|
From: Diachkov Ilia WX1215920 <diachkov.ilia1@huawei-partners.com>
|
|
Date: Mon, 19 Feb 2024 11:06:37 +0300
|
|
Subject: [PATCH 3/3] Fix fails in ICP (for src-openEuler/gcc: I90P7M, I91CZ8)
|
|
|
|
---
|
|
gcc/ipa-devirt.c | 8 +++++---
|
|
1 file changed, 5 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
|
|
index 9863084e4..194ad3f21 100644
|
|
--- a/gcc/ipa-devirt.c
|
|
+++ b/gcc/ipa-devirt.c
|
|
@@ -4805,10 +4805,12 @@ compare_block_and_init_type (tree block, tree t1)
|
|
static void
|
|
analyze_global_var (varpool_node *var)
|
|
{
|
|
- var->get_constructor();
|
|
tree decl = var->decl;
|
|
- if (TREE_CODE (decl) == SSA_NAME || !DECL_INITIAL (decl)
|
|
- || integer_zerop (DECL_INITIAL (decl)))
|
|
+ if (decl || !DECL_INITIAL (decl))
|
|
+ return;
|
|
+ var->get_constructor ();
|
|
+ if (TREE_CODE (decl) == SSA_NAME || integer_zerop (DECL_INITIAL (decl))
|
|
+ || TREE_CODE (DECL_INITIAL (decl)) == ERROR_MARK)
|
|
return;
|
|
|
|
if (dump_file && (dump_flags & TDF_DETAILS))
|
|
--
|
|
2.33.0
|
|
|