re PR c++/83659 (ICE on compilable C++ code: in tree_to_shwi, at tree.c:6821)
authorMarek Polacek <polacek@redhat.com>
Fri, 9 Feb 2018 05:46:18 +0000 (05:46 +0000)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 9 Feb 2018 05:46:18 +0000 (06:46 +0100)
commitebe4bf41d2b96a6b2f1de6a184eb0a7f5c2e5d00
treeb8a9d8946a8bf5dbff8138544a0e796605787045
parent5800666390320080558b2766738c21e82bf570e7
re PR c++/83659 (ICE on compilable C++ code: in tree_to_shwi, at tree.c:6821)

PR c++/83659
* fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
Sync some changes from cxx_fold_indirect_ref.

* constexpr.c (cxx_fold_indirect_ref): Sync some changes from
fold_indirect_ref_1, including poly_*int64.  Verify first that
tree_fits_poly_int64_p (op01).  Formatting fixes.

* g++.dg/torture/pr83659.C: New test.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r257512
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr83659.C [new file with mode: 0644]