1 Star 0 Fork 139

yangxin/gcc

forked from eastb233/src-openeuler_gcc 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Handle-POLY_INT_CSTs-in-declare_return_value.patch 1.66 KB
一键复制 编辑 原始数据 按行查看 历史
This backport contains 1 patch from gcc main stream tree.
The commit id of these patchs list as following in the order of time.
0001-Handle-POLY_INT_CSTs-in-declare_return_value.patch
be5f7eccf766a4c3a59b821f77ce320001df838f
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/inline_1.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/inline_1.c
new file mode 100644
index 00000000000..f736ac3f082
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/inline_1.c
@@ -0,0 +1,6 @@
+/* { dg-options "-O2" } */
+
+#pragma GCC aarch64 "arm_sve.h"
+
+static inline svint32_t foo () { return svdup_s32 (32); }
+svint32_t bar () { return svadd_x (svptrue_b8 (), foo (), 1); }
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 2b8b9ee58c1..9d0acd97f77 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -3654,7 +3654,7 @@ declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest,
/* ??? If we're assigning to a variable sized type, then we must
reuse the destination variable, because we've no good way to
create variable sized temporaries at this point. */
- else if (TREE_CODE (TYPE_SIZE_UNIT (caller_type)) != INTEGER_CST)
+ else if (!poly_int_tree_p (TYPE_SIZE_UNIT (caller_type)))
use_it = true;
/* If the callee cannot possibly modify MODIFY_DEST, then we can
@@ -3689,7 +3689,7 @@ declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest,
}
}
- gcc_assert (TREE_CODE (TYPE_SIZE_UNIT (callee_type)) == INTEGER_CST);
+ gcc_assert (poly_int_tree_p (TYPE_SIZE_UNIT (callee_type)));
var = copy_result_decl_to_var (result, id);
DECL_SEEN_IN_BIND_EXPR_P (var) = 1;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/anar/gcc.git
git@gitee.com:anar/gcc.git
anar
gcc
gcc
master

搜索帮助