aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-06-04 09:27:52 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2018-06-04 09:27:52 +0200
commit20b11fd41a51d669eec3601571e21e0081f5c5e0 (patch)
tree88fa3aee13c4b4623128a5cdf6ce114ad96b7366 /gcc/tree.c
parentea4767995f4e2cc46a697e09e954c6649d8cf515 (diff)
downloadgcc-20b11fd41a51d669eec3601571e21e0081f5c5e0.zip
gcc-20b11fd41a51d669eec3601571e21e0081f5c5e0.tar.gz
gcc-20b11fd41a51d669eec3601571e21e0081f5c5e0.tar.bz2
re PR c++/86025 (ICE with -Wduplicated-branches and OpenMP critical)
PR c++/86025 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE. * c-c++-common/gomp/pr86025.c: New test. From-SVN: r261137
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 85ce993..2c75953 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -7360,6 +7360,9 @@ add_expr (const_tree t, inchash::hash &hstate, unsigned int flags)
for (i = 0; i < TREE_VEC_LENGTH (t); ++i)
inchash::add_expr (TREE_VEC_ELT (t, i), hstate, flags);
return;
+ case IDENTIFIER_NODE:
+ hstate.add_object (IDENTIFIER_HASH_VALUE (t));
+ return;
case FUNCTION_DECL:
/* When referring to a built-in FUNCTION_DECL, use the __builtin__ form.
Otherwise nodes that compare equal according to operand_equal_p might