From eb12f8c4c87314779ae35842f7a833eb4ad89b62 Mon Sep 17 00:00:00 2001
From: Maximilian Downey Twiss <creatorsmithmdt@gmail.com>
Date: Fri, 18 Nov 2022 09:22:36 +1100
Subject: [PATCH 17/56] gcc: Add binfo value to tree_type_non_common and make
 TYPE_BINFO use it.

gcc/ChangeLog:

	* tree-core.h (struct tree_type_non_common): Re-add binfo.
	* tree.h (TYPE_BINFO): Use type_non_common.binfo.
---
 gcc/tree-core.h | 1 +
 gcc/tree.h      | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/tree-core.h b/gcc/tree-core.h
index e146b133dbd..90b0cac7f90 100644
--- a/gcc/tree-core.h
+++ b/gcc/tree-core.h
@@ -1745,6 +1745,7 @@ struct GTY(()) tree_type_non_common {
   tree values;
   tree minval;
   tree maxval;
+  tree binfo;
   tree lang_1;
 };
 
diff --git a/gcc/tree.h b/gcc/tree.h
index 56409bfad13..9ad86307a72 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2468,7 +2468,7 @@ extern tree vector_element_bits_tree (const_tree);
 #define TYPE_MAX_VALUE_RAW(NODE) (TYPE_CHECK (NODE)->type_non_common.maxval)
 /* For record and union types, information about this type, as a base type
    for itself.  */
-#define TYPE_BINFO(NODE) (RECORD_OR_UNION_CHECK (NODE)->type_non_common.maxval)
+#define TYPE_BINFO(NODE) (RECORD_OR_UNION_CHECK (NODE)->type_non_common.binfo)
 
 /* For types, used in a language-dependent way.  */
 #define TYPE_LANG_SLOT_1(NODE) \
-- 
2.38.1

Reply via email to