blob: 81d967c7615e16f6513f50ddcaf78a8510180219 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
From b2b710238e13eb2fced77d89cd8dcc86f77b6c6c Mon Sep 17 00:00:00 2001
From: benniaobufeijiushiji <linda7@huawei.com>
Date: Mon, 19 Dec 2022 15:12:24 +0800
Subject: [PATCH 2/3] [semi-relayout] Bugfix for struct semi-relayout Bugfix
when relayout candidate type is null.
---
gcc/ipa-struct-reorg/ipa-struct-reorg.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-struct-reorg.c
index 4751711fe..2cac340c7 100644
--- a/gcc/ipa-struct-reorg/ipa-struct-reorg.c
+++ b/gcc/ipa-struct-reorg/ipa-struct-reorg.c
@@ -6408,6 +6408,8 @@ ipa_struct_reorg::is_semi_relayout_candidate (tree xhs)
{
tree type = TREE_TYPE (mem);
srtype *old_type = get_relayout_candidate_type (type);
+ if (!old_type)
+ return false;
if (types_compatible_p (type, old_type->type)
&& old_type->semi_relayout)
return true;
--
2.27.0.windows.1
|