From 4e6482d05be433b819e3ec9ab6f058d575f084ea Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 15 Mar 2019 10:23:11 +0100 Subject: 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 --- gcc/tree.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/tree.c') 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); -- cgit v1.1