re PR c++/71537 (GCC rejects consetxpr boolean conversions and comparisons on the...
authorJakub Jelinek <jakub@redhat.com>
Tue, 6 Dec 2016 09:24:36 +0000 (10:24 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 6 Dec 2016 09:24:36 +0000 (10:24 +0100)
commit0f57194bfccc05e07b48e8ccd60d3653c6d65c9a
tree0be8f1ad83787cea9053f376cd058a980b2a2abe
parent66972191ee05c5dd2d02e5d062fe1c942e42fcd7
re PR c++/71537 (GCC rejects consetxpr boolean conversions and comparisons on the result of pointer arithmetic.)

PR c++/71537
* fold-const.c (fold_comparison): Assume CONSTANT_CLASS_P (base0)
plus offset is non-zero.  For maybe_nonzero_address decl base0,
require indirect_base0.

* g++.dg/cpp0x/constexpr-71537.C: New test.

From-SVN: r243286
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-71537.C [new file with mode: 0644]