aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>1998-05-15 14:56:11 -0400
committerJason Merrill <jason@gcc.gnu.org>1998-05-15 14:56:11 -0400
commitbbc0e641725646ce587b36d4e5f5421bdc75c274 (patch)
tree1e9ea8e3425f9eed96ace4ef5003802673438c69 /gcc
parent92834d7d83c3cf2e798407bad2435a3aa6c716e8 (diff)
downloadgcc-bbc0e641725646ce587b36d4e5f5421bdc75c274.zip
gcc-bbc0e641725646ce587b36d4e5f5421bdc75c274.tar.gz
gcc-bbc0e641725646ce587b36d4e5f5421bdc75c274.tar.bz2
tree.h (BINFO_SIZE, [...]): New macros.
* tree.h (BINFO_SIZE, TYPE_BINFO_SIZE): New macros. * stor-layout.c (layout_record): Set it. * toplev.c (rest_of_compilation): Don't defer nested functions. From-SVN: r19781
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/stor-layout.c5
-rw-r--r--gcc/toplev.c4
-rw-r--r--gcc/tree.h3
4 files changed, 19 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1cb532e..f406625 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+Fri May 15 18:55:22 1998 Jason Merrill <jason@yorick.cygnus.com>
+
+ * tree.h (BINFO_SIZE, TYPE_BINFO_SIZE): New macros.
+ * stor-layout.c (layout_record): Set it.
+
+Fri May 15 18:49:30 1998 Mark Mitchell <mmitchell@usa.net>
+
+ * toplev.c (rest_of_compilation): Don't defer nested functions.
+
Fri May 15 17:42:52 1998 Bob Manson <manson@charmed.cygnus.com>
* config/rs6000/rs6000.c (rs6000_stack_info): Align the stack bottom
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 0c1710b..c5c4d1c 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -549,6 +549,11 @@ layout_record (rec)
TYPE_ALIGN (rec) = MAX (TYPE_ALIGN (rec), record_align);
#endif
+ /* Record the un-rounded size in the binfo node. But first we check
+ the size of TYPE_BINFO to make sure that BINFO_SIZE is available. */
+ if (TYPE_BINFO (rec) && TREE_VEC_LENGTH (TYPE_BINFO (rec)) >= 6)
+ TYPE_BINFO_SIZE (rec) = TYPE_SIZE (rec);
+
#ifdef ROUND_TYPE_SIZE
TYPE_SIZE (rec) = ROUND_TYPE_SIZE (rec, TYPE_SIZE (rec), TYPE_ALIGN (rec));
#else
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 59d81ac..107b1c4 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -3023,7 +3023,8 @@ rest_of_compilation (decl)
for those functions that need to be output. Also defer those
functions that we are supposed to defer. We cannot defer
functions containing nested functions since the nested function
- data is in our non-saved obstack. */
+ data is in our non-saved obstack. We cannot defer nested
+ functions for the same reason. */
/* If this is a nested inline, remove ADDRESSOF now so we can
finish compiling ourselves. Otherwise, wait until EOF.
@@ -3038,6 +3039,7 @@ rest_of_compilation (decl)
}
if (! current_function_contains_functions
+ && ! decl_function_context (decl)
&& (DECL_DEFER_OUTPUT (decl)
|| (DECL_INLINE (decl)
&& ((! TREE_PUBLIC (decl) && ! TREE_ADDRESSABLE (decl)
diff --git a/gcc/tree.h b/gcc/tree.h
index 7b7e4cf..9643f5d 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -899,7 +899,8 @@ struct tree_type
class pointer" for the given inheritance. */
#define BINFO_VPTR_FIELD(NODE) TREE_VEC_ELT ((NODE), 5)
-/* The size of a base class subobject of this type. */
+/* The size of a base class subobject of this type. Not all frontends
+ currently allocate the space for this field. */
#define BINFO_SIZE(NODE) TREE_VEC_ELT ((NODE), 6)
#define TYPE_BINFO_SIZE(NODE) BINFO_SIZE (TYPE_BINFO (NODE))