Fix unguarded uses of tree_to_uhwi
commit03411a7c8331735a231b8cbc72dab68d710be25b
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Sep 2017 11:06:48 +0000 (21 11:06 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Sep 2017 11:06:48 +0000 (21 11:06 +0000)
treeee231ccdf565d1f70e11d3f988284a4572f8f0ff
parent131a1c2fd1d6260cc657c477c2dbbcfe68d8443d
Fix unguarded uses of tree_to_uhwi

This patch uses tree_fits_uhwi_p to protect a previously unguarded
use of tree_to_uhwi.  Previously we would ICE for variable-sized types.

2017-09-20  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* tree.c (find_atomic_core_type): Check tree_fits_uhwi_p before
calling tree_to_uhwi.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253057 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/tree.c