diff options
author | Richard Guenther <rguenther@suse.de> | 2011-04-11 15:47:30 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-04-11 15:47:30 +0000 |
commit | e6313a7840a9266bb5777cd29b86885b63b3b24f (patch) | |
tree | c2b6fa4bc2cb17fae072b77ff6076eb93e0676c1 /gcc/c-family | |
parent | e69d7376989727cf50f2b674227b3e60725bb9af (diff) | |
download | gcc-e6313a7840a9266bb5777cd29b86885b63b3b24f.zip gcc-e6313a7840a9266bb5777cd29b86885b63b3b24f.tar.gz gcc-e6313a7840a9266bb5777cd29b86885b63b3b24f.tar.bz2 |
stor-layout.c (layout_type): Compute all array index size operations in the original type.
2011-04-11 Richard Guenther <rguenther@suse.de>
* stor-layout.c (layout_type): Compute all array index size operations
in the original type.
(initialize_sizetypes): Add comment.
(set_sizetype): Do not set TREE_TYPE of a TREE_VEC.
c-family/
* c-common.c (complete_array_type): Build a range type of
proper type.
From-SVN: r172261
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-family/c-common.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index af66eda..780036e 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2011-04-11 Richard Guenther <rguenther@suse.de> + + * c-common.c (complete_array_type): Build a range type of + proper type. + 2011-04-08 Nathan Froyd <froydnj@codesourcery.com> * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES. diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 63444b8..030e3c6 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -8810,7 +8810,9 @@ complete_array_type (tree *ptype, tree initial_value, bool do_default) TYPE_LANG_FLAG_? bits that the front end may have set. */ main_type = build_distinct_type_copy (TYPE_MAIN_VARIANT (type)); TREE_TYPE (main_type) = unqual_elt; - TYPE_DOMAIN (main_type) = build_index_type (maxindex); + TYPE_DOMAIN (main_type) + = build_range_type (TREE_TYPE (maxindex), + build_int_cst (TREE_TYPE (maxindex), 0), maxindex); layout_type (main_type); /* Make sure we have the canonical MAIN_TYPE. */ |