warn_for_memset calls fold_for_warn, which calls fold_non_dependent_expr, so
also calling instantiate_non_dependent_expr here is undesirable.
PR c++/90997
* semantics.c (finish_call_expr): Don't call
instantiate_non_dependent_expr before warn_for_memset.
+2020-01-26 Jason Merrill <jason@redhat.com>
+
+ PR c++/90997
+ * semantics.c (finish_call_expr): Don't call
+ instantiate_non_dependent_expr before warn_for_memset.
+
2020-01-25 Marek Polacek <polacek@redhat.com>
PR c++/93414 - poor diagnostic for dynamic_cast in constexpr context.
tree arg2 = (*orig_args)[2];
int literal_mask = ((literal_integer_zerop (arg1) << 1)
| (literal_integer_zerop (arg2) << 2));
- arg2 = instantiate_non_dependent_expr (arg2);
warn_for_memset (input_location, arg0, arg2, literal_mask);
}
--- /dev/null
+// PR c++/90997
+
+template<class> void f ()
+{ __builtin_memset (0, 0, int(0.)); }