Commit 9420e113 by Fabien Chêne

re PR c++/20039 (uninitialized const in `new' of `const struct')

gcc/testsuite/ChangeLog:

2011-05-09  Fabien Chene  <fabien@gcc.gnu.org>
	PR c++/20039
	* g++.dg/init/pr20039.C: New.

From-SVN: r173592
parent fca132b9
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
......@@ -9,7 +13,7 @@
* 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.
......
// 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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment