aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-03-15 10:23:11 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-03-15 10:23:11 +0100
commit4e6482d05be433b819e3ec9ab6f058d575f084ea (patch)
tree7dda386820bff124d8b717747e3aa2e9c0ba77c5 /gcc/tree.c
parent8eb2215d8dc2662c3edad179b842097e0dce2722 (diff)
downloadgcc-4e6482d05be433b819e3ec9ab6f058d575f084ea.zip
gcc-4e6482d05be433b819e3ec9ab6f058d575f084ea.tar.gz
gcc-4e6482d05be433b819e3ec9ab6f058d575f084ea.tar.bz2
re PR c++/89709 (ICE with constexpr and "-O")
PR c++/89709 * tree.c (inchash::add_expr): Strip any location wrappers. * fold-const.c (operand_equal_p): Move stripping of location wrapper after hash verification. * g++.dg/cpp0x/constexpr-89709.C: New test. From-SVN: r269702
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 02721cf..d061a04 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -7743,6 +7743,8 @@ add_expr (const_tree t, inchash::hash &hstate, unsigned int flags)
return;
}
+ STRIP_ANY_LOCATION_WRAPPER (t);
+
if (!(flags & OEP_ADDRESS_OF))
STRIP_NOPS (t);