+202-05-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/94968
+ * c-common.c (speculation_safe_value_resolve_params): Return false if
+ error_operand_p (val2).
+ (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
+ Remove extraneous semicolon.
+
2020-05-06 qing zhao <qing.zhao@oracle.com>
PR c/94230
tree val2 = (*params)[1];
if (TREE_CODE (TREE_TYPE (val2)) == ARRAY_TYPE)
val2 = default_conversion (val2);
+ if (error_operand_p (val2))
+ return false;
if (!(TREE_TYPE (val) == TREE_TYPE (val2)
|| useless_type_conversion_p (TREE_TYPE (val), TREE_TYPE (val2))))
{
{
tree new_function, first_param, result;
enum built_in_function fncode
- = speculation_safe_value_resolve_call (function, params);;
+ = speculation_safe_value_resolve_call (function, params);
if (fncode == BUILT_IN_NONE)
return error_mark_node;
+202-05-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/94968
+ * gcc.dg/pr94968.c: New test.
+
2020-05-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/57359
--- /dev/null
+/* PR c/94968 */
+/* { dg-do compile } */
+
+int
+foo (void)
+{
+ __builtin_speculation_safe_value (1, x); /* { dg-error "undeclared" } */
+} /* { dg-message "each undeclared identifier is reported only once" "" { target *-*-* } .-1 } */