gcc/testsuite/ChangeLog:
2011-05-09 Fabien Chene <fabien@gcc.gnu.org>
PR c++/20039
* g++.dg/init/pr20039.C: New.
From-SVN: r173592
+2011-05-09 Fabien Chêne <fabien@gcc.gnu.org>
+ PR c++/20039
+ * g++.dg/init/pr20039.C: New.
+
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48737
* g++.dg/template/nontype23.C: New.
-2001-05-07 Fabien Chêne <fabien@gcc.gnu.org>
+2011-05-07 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/48859
* g++.dg/init/pr48859.C: New.
--- /dev/null
+// PR c++/20039
+// { dg-do compile }
+
+struct M
+{
+ M() : m(0) { }
+ int m;
+};
+
+struct X
+{
+ M m;
+};
+
+int mymain()
+{
+ const X *p = new const X[2]; // { dg-error "uninitialized const" }
+ return 0;
+}