diff options
author | Richard Biener <rguenther@suse.de> | 2016-12-13 09:17:42 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-12-13 09:17:42 +0000 |
commit | 6182121c120a277dd38eb28e669866842a83a4dc (patch) | |
tree | c4391d1481feb6460765c0bf0934473b01c2383e /gcc/tree.c | |
parent | 56b7aede9188eeda696eff95effb2288289ddc52 (diff) | |
download | gcc-6182121c120a277dd38eb28e669866842a83a4dc.zip gcc-6182121c120a277dd38eb28e669866842a83a4dc.tar.gz gcc-6182121c120a277dd38eb28e669866842a83a4dc.tar.bz2 |
re PR tree-optimization/78742 (internal compiler error: in int_cst_value, at tree.c:10782)
2016-12-13 Richard Biener <rguenther@suse.de>
PR middle-end/78742
* tree.c (cst_and_fits_in_hwi): Look if the actual value fits.
* tree-object-size.c (compute_builtin_object_size): Use
tree_fits_shwi_p.
* tree-data-ref.c (initialize_matrix_A): Remove excess assert.
* gcc.dg/torture/pr78742.c: New testcase.
From-SVN: r243598
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1677,7 +1677,7 @@ bool cst_and_fits_in_hwi (const_tree x) { return (TREE_CODE (x) == INTEGER_CST - && TYPE_PRECISION (TREE_TYPE (x)) <= HOST_BITS_PER_WIDE_INT); + && (tree_fits_shwi_p (x) || tree_fits_uhwi_p (x))); } /* Build a newly constructed VECTOR_CST node of length LEN. */ |