re PR c/82765 (ICE at -Os on valid code on x86_64-linux-gnu: in tree_to_shwi, at...
authorRichard Biener <rguenther@suse.de>
Thu, 2 Nov 2017 08:28:18 +0000 (08:28 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 2 Nov 2017 08:28:18 +0000 (08:28 +0000)
commita4d758d005722358ce73ac1b31fea68358667e83
treea29ae71e7c2e948a8d7bc9e9219c90dc1ff37333
parent30d124e1e6c41c7f08651e9551d702627d2bb5fd
re PR c/82765 (ICE at -Os on valid code on x86_64-linux-gnu: in tree_to_shwi, at tree.c:6611)

2017-11-02  Richard Biener  <rguenther@suse.de>

PR middle-end/82765
* varasm.c (decode_addr_const): Make offset HOST_WIDE_INT.
Truncate ARRAY_REF index and element size.

* gcc.dg/pr82765.c: New testcase.

From-SVN: r254337
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr82765.c [new file with mode: 0644]
gcc/varasm.c