PR c++/91705 - constexpr evaluation rejects ++/-- on floats.
authorMarek Polacek <polacek@redhat.com>
Tue, 10 Sep 2019 21:04:33 +0000 (21:04 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 10 Sep 2019 21:04:33 +0000 (21:04 +0000)
commitd85569f63db86e656ecb79b81c74a906f27bf509
tree78333e30ba6ed1884216dfdc8eb442aad4b91bdf
parentefc864927f57fa1a4aa8d1f22e4071343f0b8cbb
PR c++/91705 - constexpr evaluation rejects ++/-- on floats.

* constexpr.c (cxx_eval_increment_expression): Call fold_simple on
the offset.

* g++.dg/cpp1y/constexpr-incr2.C: New test.

From-SVN: r275613
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/constexpr-incr2.C [new file with mode: 0644]