PR c++/47808
* decl.c (compute_array_index_type): Discard folding
if it didn't produce a constant.
From-SVN: r170878
+2011-03-11 Jason Merrill <jason@redhat.com>
+
+ PR c++/47808
+ * decl.c (compute_array_index_type): Discard folding
+ if it didn't produce a constant.
+
2011-03-11 Jakub Jelinek <jakub@redhat.com>
PR c++/48035
}
size = maybe_constant_value (size);
+ if (!TREE_CONSTANT (size))
+ size = osize;
}
if (error_operand_p (size))
+2011-03-11 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/regress/array1.C: New.
+
2011-03-11 Richard Guenther <rguenther@suse.de>
PR tree-optimization/48067
--- /dev/null
+// PR c++/47808
+// { dg-options -std=c++0x }
+
+template <typename T>
+inline T abs (T const & x) { return x; }
+
+template <typename T>
+void f (T)
+{
+ typedef int ai[(abs(0.1) > 0) ? 1 : -1];
+}
+
+int main()
+{
+ f(1);
+}