public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch] testcase for c++/20039
@ 2011-05-09 20:59 Fabien Chêne
  2011-05-09 21:37 ` Jason Merrill
  0 siblings, 1 reply; 2+ messages in thread
From: Fabien Chêne @ 2011-05-09 20:59 UTC (permalink / raw)
  To: GCC Patches; +Cc: Jason Merrill

[-- Attachment #1: Type: text/plain, Size: 266 bytes --]

Hi,

PR c++/20039 was closed without providing a testcase, here's one.
tested x86_64-unknown-linux-gnu.

OK for trunk ?

gcc/testsuite/ChangeLog:

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

-- 
Fabien

[-- Attachment #2: pr20039.patch --]
[-- Type: application/octet-stream, Size: 452 bytes --]

Index: gcc/testsuite/g++.dg/init/pr20039.C
===================================================================
--- gcc/testsuite/g++.dg/init/pr20039.C	(revision 0)
+++ gcc/testsuite/g++.dg/init/pr20039.C	(revision 0)
@@ -0,0 +1,19 @@
+// 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;
+}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch] testcase for c++/20039
  2011-05-09 20:59 [Patch] testcase for c++/20039 Fabien Chêne
@ 2011-05-09 21:37 ` Jason Merrill
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Merrill @ 2011-05-09 21:37 UTC (permalink / raw)
  To: Fabien Chêne; +Cc: GCC Patches

OK.

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-09 20:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-09 20:59 [Patch] testcase for c++/20039 Fabien Chêne
2011-05-09 21:37 ` Jason Merrill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).