From d82826d1a1c7ea45a761dfbf76b879712c7332ec Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Tue, 17 Oct 2023 02:15:03 +0000 Subject: automatic import of gcc --- ...-relayout-Bugfix-for-struct-semi-relayout.patch | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 0086-semi-relayout-Bugfix-for-struct-semi-relayout.patch (limited to '0086-semi-relayout-Bugfix-for-struct-semi-relayout.patch') diff --git a/0086-semi-relayout-Bugfix-for-struct-semi-relayout.patch b/0086-semi-relayout-Bugfix-for-struct-semi-relayout.patch new file mode 100644 index 0000000..81d967c --- /dev/null +++ b/0086-semi-relayout-Bugfix-for-struct-semi-relayout.patch @@ -0,0 +1,26 @@ +From b2b710238e13eb2fced77d89cd8dcc86f77b6c6c Mon Sep 17 00:00:00 2001 +From: benniaobufeijiushiji +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 + -- cgit v1.2.3