diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2005-11-10 16:24:54 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2005-11-10 16:24:54 +0000 |
commit | d25f3b83ce00e7b7750bcfb9d564a318313b60ab (patch) | |
tree | e8bdab964152705cd339fb180269dd873cb4ae88 /gcc/tree.c | |
parent | c5798879234295caa4e9ff863697989a663bc864 (diff) | |
download | gcc-d25f3b83ce00e7b7750bcfb9d564a318313b60ab.zip gcc-d25f3b83ce00e7b7750bcfb9d564a318313b60ab.tar.gz gcc-d25f3b83ce00e7b7750bcfb9d564a318313b60ab.tar.bz2 |
tree.c (int_fits_type_p): Only look at the base type if it has the same precision as the original type.
* tree.c (int_fits_type_p): Only look at the base type
if it has the same precision as the original type.
From-SVN: r106738
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -5558,8 +5558,11 @@ int_fits_type_p (tree c, tree type) return 0; /* If we haven't been able to decide at this point, there nothing more we - can check ourselves here. Look at the base type if we have one. */ - if (TREE_CODE (type) == INTEGER_TYPE && TREE_TYPE (type) != 0) + can check ourselves here. Look at the base type if we have one and it + has the same precision. */ + if (TREE_CODE (type) == INTEGER_TYPE + && TREE_TYPE (type) != 0 + && TYPE_PRECISION (type) == TYPE_PRECISION (TREE_TYPE (type))) return int_fits_type_p (c, TREE_TYPE (type)); /* Or to force_fit_type, if nothing else. */ |