+2017-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/80097
+ * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
+ optional COMPOUND_EXPR with ubsan instrumentation.
+
2017-03-17 Marek Polacek <polacek@redhat.com>
* c-parser.c: Add C11 references.
else if (TREE_CODE (ret) != INTEGER_CST && int_operands
&& !in_late_binary_op)
ret = note_integer_operands (ret);
- if (semantic_result_type)
- ret = build1 (EXCESS_PRECISION_EXPR, semantic_result_type, ret);
protected_set_expr_location (ret, location);
if (instrument_expr != NULL)
ret = fold_build2 (COMPOUND_EXPR, TREE_TYPE (ret),
instrument_expr, ret);
+ if (semantic_result_type)
+ ret = build1_loc (location, EXCESS_PRECISION_EXPR,
+ semantic_result_type, ret);
+
return ret;
}
+2017-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/80097
+ * gcc.dg/ubsan/pr80097.c: New test.
+
2017-03-20 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/80054