1 Star 0 Fork 131

wangding16/src-gcc

forked from src-openEuler/gcc 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0086-semi-relayout-Bugfix-for-struct-semi-relayout.patch 926 Bytes
一键复制 编辑 原始数据 按行查看 历史
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangding16/src-gcc.git
git@gitee.com:wangding16/src-gcc.git
wangding16
src-gcc
src-gcc
master

搜索帮助