diff options
author | Richard Guenther <rguenther@suse.de> | 2011-08-01 11:51:04 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-08-01 11:51:04 +0000 |
commit | e62a2b6e5c59d63f2fe3346300255d8d2a124b55 (patch) | |
tree | 5b14da35080a898181d8aaa4dc6de113686194f7 /gcc/stor-layout.c | |
parent | f64398b59c1aaeeae30a5cbd65ba2cbdc69b4dc8 (diff) | |
download | gcc-e62a2b6e5c59d63f2fe3346300255d8d2a124b55.zip gcc-e62a2b6e5c59d63f2fe3346300255d8d2a124b55.tar.gz gcc-e62a2b6e5c59d63f2fe3346300255d8d2a124b55.tar.bz2 |
stor-layout.c (initialize_sizetypes): Properly sign-extend bitsiztype TYPE_MAX_VALUE.
2011-08-01 Richard Guenther <rguenther@suse.de>
* stor-layout.c (initialize_sizetypes): Properly sign-extend
bitsiztype TYPE_MAX_VALUE.
From-SVN: r177016
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 8a5c48d..e488741 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -2247,7 +2247,11 @@ initialize_sizetypes (void) = size_int (GET_MODE_SIZE (TYPE_MODE (bitsizetype))); set_min_and_max_values_for_integral_type (bitsizetype, bprecision, /*is_unsigned=*/true); - /* ??? TYPE_MAX_VALUE is not properly sign-extended. */ + /* bitsizetype is unsigned but we need to fix TYPE_MAX_VALUE so that it is + sign-extended in a way consistent with force_fit_type. */ + TYPE_MAX_VALUE (bitsizetype) + = double_int_to_tree (bitsizetype, + tree_to_double_int (TYPE_MAX_VALUE (bitsizetype))); /* Create the signed variants of *sizetype. */ ssizetype = make_signed_type (TYPE_PRECISION (sizetype)); |