+2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
+
+ * cp-array-notation.c (cp_expand_cond_array_notations): Return
+ error_mark_node only if find_rank failed, not if it was
+ successful.
+
2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
PR c++/68936
if (!find_rank (EXPR_LOCATION (cond), cond, cond, true, &cond_rank)
|| !find_rank (EXPR_LOCATION (yes_expr), yes_expr, yes_expr, true,
&yes_rank)
- || find_rank (EXPR_LOCATION (no_expr), no_expr, no_expr, true,
- &no_rank))
+ || !find_rank (EXPR_LOCATION (no_expr), no_expr, no_expr, true,
+ &no_rank))
return error_mark_node;
/* If the condition has a zero rank, then handle array notations in body
separately. */
+2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
+
+ * c-c++-common/cilk-plus/AN/an-if.c: Check that the original
+ dump does not contain an error_mark_node.
+ * c-c++-common/cilk-plus/CK/pr60469.c: Likewise.
+ * c-c++-common/cilk-plus/AN/fn_ptr-2.c: New xfail'd test.
+
2016-01-16 Patrick Palka <ppalka@gcc.gnu.org>
PR c++/68936
/* { dg-do run } */
-/* { dg-options "-fcilkplus" } */
+/* { dg-options "-fcilkplus -fdump-tree-original" } */
#if HAVE_IO
#include <stdio.h>
}
return 0;
}
+
+/* The C++ FE once emitted a bogus error_mark_node for this test case. */
+/* { dg-final { scan-tree-dump-not "<<< error >>>" "original" } } */
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+typedef void (*f) (void *);
+f b[1024];
+void *c[1024][1024];
+
+int
+main (void)
+{
+ (b[:]) (c[:][:]); /* { dg-error "rank mismatch" "" { xfail *-*-* } } */
+ return 0;
+}
+
/* PR middle-end/60469 */
/* { dg-do compile } */
-/* { dg-options "-fcilkplus" } */
+/* { dg-options "-fcilkplus -fdump-tree-original" } */
void foo() {}
_Cilk_spawn foo();
return 0;
}
+
+/* The C++ FE once emitted a bogus error_mark_node for this test case. */
+/* { dg-final { scan-tree-dump-not "<<< error >>>" "original" } } */