re PR c++/71448 (pointer relational comparison fails inside constant expression)
authorJakub Jelinek <jakub@redhat.com>
Wed, 8 Jun 2016 12:57:26 +0000 (14:57 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 8 Jun 2016 12:57:26 +0000 (14:57 +0200)
commit988c115ca0fee432e5d6823a44e3289c0b73ad15
tree890951bd2d7f413e5846a19196d7dc0c3db20bd6
parent867a0126bcb8e2ea2b9ef900ac8b6b75c4fc6382
re PR c++/71448 (pointer relational comparison fails inside constant expression)

PR c++/71448
* fold-const.c (fold_comparison): Handle CONSTANT_CLASS_P (base0)
the same as DECL_P (base0) for indirect_base0.  Use equality_code
in one further place.

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

Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r237212
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr71448.C [new file with mode: 0644]