gcc/0183-Fix-fail-in-ICP-src-openEuler-gcc-I8RP4H.patch
2024-01-26 11:39:25 +08:00

27 lines
971 B
Diff

From 351d049f09b1e96e48c3038ab3a6a9c1d6a13f8d Mon Sep 17 00:00:00 2001
From: Diachkov Ilia <diachkov.ilia1@huawei-partners.com>
Date: Thu, 28 Dec 2023 09:51:34 +0800
Subject: [PATCH 2/4] Fix fail in ICP (src-openEuler/gcc: I8RP4H)
---
gcc/ipa-devirt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
index 987f15a15..ed19a57a4 100644
--- a/gcc/ipa-devirt.c
+++ b/gcc/ipa-devirt.c
@@ -4979,7 +4979,8 @@ analyze_assign_stmt (gimple *stmt)
rhs = TREE_OPERAND (rhs, 0);
if (VAR_OR_FUNCTION_DECL_P (rhs) || TREE_CODE (rhs) == STRING_CST
|| TREE_CODE (rhs) == ARRAY_REF || TREE_CODE (rhs) == PARM_DECL
- || TREE_CODE (rhs) == LABEL_DECL || TREE_CODE (rhs) == CONST_DECL)
+ || TREE_CODE (rhs) == LABEL_DECL || TREE_CODE (rhs) == CONST_DECL
+ || TREE_CODE (rhs) == RESULT_DECL)
rhs_type = build_pointer_type (TREE_TYPE (rhs));
else if (TREE_CODE (rhs) == COMPONENT_REF)
{
--
2.33.0