re PR c++/68087 (ICE with constexpr in array with negative index)
authorMarkus Trippelsdorf <markus@trippelsdorf.de>
Wed, 25 Nov 2015 16:40:16 +0000 (16:40 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 25 Nov 2015 16:40:16 +0000 (16:40 +0000)
commitc2127564efc152de34ea1a15ce9b20e8ddccfc2c
tree7a0e71f5c6fe1fafc9254a12eca779ae7728bc8d
parent8e2d104ba2f4f89d6479d03f75cc374484875fc7
re PR c++/68087 (ICE with constexpr in array with negative index)

/cp
2015-11-25  Markus Trippelsdorf  <markus@trippelsdorf.de>
    Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/68087
* constexpr.c (cxx_eval_array_reference): Use tree_fits_shwi_p before
tree_to_shwi to avoid ICEs.

/testsuite
2015-11-25  Markus Trippelsdorf  <markus@trippelsdorf.de>
    Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/68087
* g++.dg/cpp0x/constexpr-array13.C: New.

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>
From-SVN: r230886
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-array13.C [new file with mode: 0644]