/cp
2011-05-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/47969
* decl.c (compute_array_index_type): Check build_expr_type_conversion
return value for NULL_TREE.
/testsuite
2011-05-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/47969
* g++.dg/cpp0x/constexpr-47969.C: New.
From-SVN: r173249
+2011-05-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/47969
+ * decl.c (compute_array_index_type): Check build_expr_type_conversion
+ return value for NULL_TREE.
+
2011-04-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48606
&& CLASSTYPE_LITERAL_P (type))
{
size = build_expr_type_conversion (WANT_INT, size, true);
+ if (!size)
+ {
+ if (!(complain & tf_error))
+ return error_mark_node;
+ if (name)
+ error ("size of array %qD has non-integral type %qT",
+ name, type);
+ else
+ error ("size of array has non-integral type %qT", type);
+ size = integer_one_node;
+ }
if (size == error_mark_node)
return error_mark_node;
type = TREE_TYPE (size);
+2011-05-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/47969
+ * g++.dg/cpp0x/constexpr-47969.C: New.
+
2011-05-02 Ira Rosen <ira.rosen@linaro.org>
PR testsuite/48498
vect_no_align targets.
2011-05-01 Xinliang David Li <davidxl@google.com>
-
+
* gcc.dg/tree-ssa/integer-addr.c: New test.
* gcc.dg/tree-ssa/alias_bug.c: New test.
--- /dev/null
+// PR c++/47969
+// { dg-options -std=c++0x }
+
+struct A
+{
+ // constexpr operator int () { return 1; }
+};
+
+constexpr A a = A();
+
+int ar[a]; // { dg-error "has non-integral type" }