* call.c (set_up_extended_ref_temp): Call cp_fully_fold.
From-SVN: r259108
2018-04-04 Jason Merrill <jason@redhat.com>
+ PR c++/84938 - ICE with division by ~-1.
+ * call.c (set_up_extended_ref_temp): Call cp_fully_fold.
+
PR c++/84936 - ICE with unexpanded pack in mem-initializer.
* parser.c (cp_parser_mem_initializer_list): Call
check_for_bare_parameter_packs.
/* If the initializer is constant, put it in DECL_INITIAL so we get
static initialization and use in constant expressions. */
init = maybe_constant_init (expr);
+ /* As in store_init_value. */
+ init = cp_fully_fold (init);
if (TREE_CONSTANT (init))
{
if (literal_type_p (type) && CP_TYPE_CONST_NON_VOLATILE_P (type))
--- /dev/null
+// PR c++/84938
+
+const int &a = 1 / ~-1; // { dg-warning "division by zero" }