PR c++/86025
* tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
* c-c++-common/gomp/pr86025.c: New test.
From-SVN: r261137
+2018-06-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/86025
+ * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
+
2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
PR tree-optimization/86034
+2018-06-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/86025
+ * c-c++-common/gomp/pr86025.c: New test.
+
2018-06-03 Andreas Schwab <schwab@linux-m68k.org>
* gcc.target/powerpc/altivec-7.c: Remove extra brace.
--- /dev/null
+/* PR c++/86025 */
+/* { dg-do compile } */
+/* { dg-additional-options "-Wduplicated-branches" } */
+
+int i;
+
+void
+foo (int x)
+{
+ if (x)
+ {
+ #pragma omp critical (foo)
+ i++;
+ }
+ else
+ {
+ #pragma omp critical
+ i++;
+ }
+}
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