gcc/0076-Struct-Reorg-Fix-speccpu2006-462-double-free-I60YUV.patch
benniaobufeijiushiji a41360f2fb [Sync] Sync patch from openeuler/gcc
Sync patch from openeuler/gcc - 20221201

(cherry picked from commit 5487e8942c694fd317f2cbf1662e9eaf33f2f612)
2022-12-01 11:56:57 +08:00

39 lines
1.3 KiB
Diff

From b669b4512e8425f4d752ef76bf61097cf40d9b35 Mon Sep 17 00:00:00 2001
From: zgat <1071107108@qq.com>
Date: Thu, 17 Nov 2022 02:55:48 +0000
Subject: [PATCH 28/35] [Struct Reorg] Fix speccpu2006 462 double free #I60YUV
modify gcc/tree.c. Normal operation speccpu 462 after modifed
Signed-off-by: zgat <1071107108@qq.com>
---
gcc/tree.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/gcc/tree.c b/gcc/tree.c
index 2a532d15a..a61788651 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -5224,8 +5224,7 @@ fld_simplified_type_name (tree type)
optimizations. */
if (flag_ipa_struct_reorg
&& lang_c_p ()
- && flag_lto_partition == LTO_PARTITION_ONE
- && (in_lto_p || flag_whole_program))
+ && flag_lto_partition == LTO_PARTITION_ONE)
return TYPE_NAME (type);
if (!TYPE_NAME (type) || TREE_CODE (TYPE_NAME (type)) != TYPE_DECL)
@@ -5471,8 +5470,7 @@ fld_simplified_type (tree t, class free_lang_data_d *fld)
optimizations. */
if (flag_ipa_struct_reorg
&& lang_c_p ()
- && flag_lto_partition == LTO_PARTITION_ONE
- && (in_lto_p || flag_whole_program))
+ && flag_lto_partition == LTO_PARTITION_ONE)
return t;
if (POINTER_TYPE_P (t))
return fld_incomplete_type_of (t, fld);
--
2.27.0.windows.1