diff options
author | Diego Novillo <dnovillo@google.com> | 2009-02-22 22:19:28 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@google.com> | 2009-02-22 22:19:28 +0000 |
commit | fd5bfeade355c418cdbe4475c996f17017969d75 (patch) | |
tree | d877e0bcdbb9b970eb34de6cd811656b97b75a9c /gcc | |
parent | 6d7ff2b31bfc22aa5f458ebe8bde278f18e33548 (diff) |
* tree.c (free_lang_data_in_type): Remove non-FIELD_DECLs
from UNION_TYPE and QUAL_UNION_TYPE.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/lto@144376 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog.lto | 5 | ||||
-rw-r--r-- | gcc/tree.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog.lto b/gcc/ChangeLog.lto index 9831597008c..dfd883a69e7 100644 --- a/gcc/ChangeLog.lto +++ b/gcc/ChangeLog.lto @@ -1,5 +1,10 @@ 2009-02-22 Diego Novillo <dnovillo@google.com> + * tree.c (free_lang_data_in_type): Remove non-FIELD_DECLs + from UNION_TYPE and QUAL_UNION_TYPE. + +2009-02-22 Diego Novillo <dnovillo@google.com> + * gimple.c (gimple_types_compatible_p): Call itself recursively when comparing fields of aggregates. Handle unions. diff --git a/gcc/tree.c b/gcc/tree.c index 67a0f1fa7d6..5443fa70af1 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -3825,9 +3825,11 @@ free_lang_data_in_type (tree type) } } - /* Remove members that are not actually FIELD_DECLs - from the field list of a record. These occur in C++. */ - if (TREE_CODE (type) == RECORD_TYPE) + /* Remove members that are not actually FIELD_DECLs from the field + list of an aggregate. These occur in C++. */ + if (TREE_CODE (type) == RECORD_TYPE + || TREE_CODE (type) == UNION_TYPE + || TREE_CODE (type) == QUAL_UNION_TYPE) { tree prev, member; |