+2016-01-08 Jason Merrill <jason@redhat.com>
+
+ PR c++/69158
+ * constexpr.c (cxx_fold_indirect_ref): Handle array type differing
+ in completion.
+
2016-01-08 Marek Polacek <polacek@redhat.com>
PR c++/68449
if (TREE_CODE (op) == CONST_DECL)
return DECL_INITIAL (op);
/* *&p => p; make sure to handle *&"str"[cst] here. */
- if (same_type_ignoring_top_level_qualifiers_p (optype, type))
+ if (same_type_ignoring_top_level_qualifiers_p (optype, type)
+ /* Also handle the case where the desired type is an array of unknown
+ bounds because the variable has had its bounds deduced since the
+ ADDR_EXPR was created. */
+ || (TREE_CODE (type) == ARRAY_TYPE
+ && TREE_CODE (optype) == ARRAY_TYPE
+ && TYPE_DOMAIN (type) == NULL_TREE
+ && same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (optype),
+ TREE_TYPE (type))))
{
tree fop = fold_read_from_constant_string (op);
if (fop)