diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-04 09:33:27 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-04 09:33:27 +0000 |
commit | 4edf95958b8432243b35ecc1fd79b64518aa840e (patch) | |
tree | 545e293fab8233f9deeb726eb8ac9e905134d7b5 /gcc | |
parent | 025fb219bc5f8fbca16b62cf3754ced5c1889628 (diff) | |
download | gcc-4edf95958b8432243b35ecc1fd79b64518aa840e.tar.gz |
PR middle-end/38371
* fold-const.c (fold_checksum_tree): Allow modification of
TYPE_NEXT_VARIANT.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142430 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fold-const.c | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 29104d84018..a8aba92c2cf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-12-04 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/38371 + * fold-const.c (fold_checksum_tree): Allow modification of + TYPE_NEXT_VARIANT. + 2008-12-03 Jakub Jelinek <jakub@redhat.com> PR middle-end/38360 diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 93415d8cbac..41779e576bb 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -13364,9 +13364,11 @@ recursive_label: expr = (tree) &buf; } else if (TREE_CODE_CLASS (code) == tcc_type - && (TYPE_POINTER_TO (expr) || TYPE_REFERENCE_TO (expr) + && (TYPE_POINTER_TO (expr) + || TYPE_REFERENCE_TO (expr) || TYPE_CACHED_VALUES_P (expr) - || TYPE_CONTAINS_PLACEHOLDER_INTERNAL (expr))) + || TYPE_CONTAINS_PLACEHOLDER_INTERNAL (expr) + || TYPE_NEXT_VARIANT (expr))) { /* Allow these fields to be modified. */ tree tmp; @@ -13375,6 +13377,7 @@ recursive_label: TYPE_CONTAINS_PLACEHOLDER_INTERNAL (tmp) = 0; TYPE_POINTER_TO (tmp) = NULL; TYPE_REFERENCE_TO (tmp) = NULL; + TYPE_NEXT_VARIANT (tmp) = NULL; if (TYPE_CACHED_VALUES_P (tmp)) { TYPE_CACHED_VALUES_P (tmp) = 0; |