+2015-03-31 Marek Polacek <polacek@redhat.com>
+
+ PR c++/65390
+ * tree.c (build_cplus_array_type): Use dependent_type_p rather than
+ checking for constness.
+
2015-03-30 Marek Polacek <polacek@redhat.com>
PR c++/65398
if (elt_type == error_mark_node || index_type == error_mark_node)
return error_mark_node;
- bool dependent
- = (processing_template_decl
- && (dependent_type_p (elt_type)
- || (index_type && !TREE_CONSTANT (TYPE_MAX_VALUE (index_type)))));
+ bool dependent = (processing_template_decl
+ && (dependent_type_p (elt_type)
+ || (index_type && dependent_type_p (index_type))));
if (elt_type != TYPE_MAIN_VARIANT (elt_type))
/* Start with an array of the TYPE_MAIN_VARIANT. */
+2015-03-31 Marek Polacek <polacek@redhat.com>
+
+ PR c++/65390
+ * g++.dg/template/pr65390.C: New test.
+
2015-03-31 Martin Liska <mliska@suse.cz>
* g++.dg/ipa/pr65557.C: New test.
--- /dev/null
+// PR c++/65390
+// { dg-do compile }
+// { dg-options "" }
+
+template<typename T> struct shared_ptr { };
+
+template<typename T, typename Arg>
+shared_ptr<T> make_shared(Arg) { return shared_ptr<T>(); } // { dg-error "variably modified type|trying to instantiate" }
+
+void f(int n){
+ make_shared<int[n]>(1); // { dg-error "no matching function" }
+}