+2019-10-02 Jason Merrill <jason@redhat.com>
+
+ * typeck2.c (store_init_value): Only clear_cv_and_fold_caches if the
+ value is constant.
+
2019-09-30 Jason Merrill <jason@redhat.com>
Use hash_map_safe_* functions.
/* Handle aggregate NSDMI in non-constant initializers, too. */
value = replace_placeholders (value, decl);
- /* DECL may change value; purge caches. */
- clear_cv_and_fold_caches ();
-
/* If the initializer is not a constant, fill in DECL_INITIAL with
the bits that are constant, and then return an expression that
will perform the dynamic initialization. */
|| vla_type_p (type)
|| ! reduced_constant_expression_p (value)))
return split_nonconstant_init (decl, value);
+
+ /* DECL may change value; purge caches. */
+ clear_cv_and_fold_caches ();
+
/* If the value is a constant, just put it in DECL_INITIAL. If DECL
is an automatic variable, the middle end will turn this into a
dynamic initialization later. */