]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Fri, 3 Jun 2005 16:29:35 +0000 (16:29 +0000)
committerNo Author <no-author@gcc.gnu.org>
Fri, 3 Jun 2005 16:29:35 +0000 (16:29 +0000)
'gcc-3_4-branch'.

From-SVN: r100544

gcc/testsuite/g++.dg/template/new2.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/template/new2.C b/gcc/testsuite/g++.dg/template/new2.C
new file mode 100644 (file)
index 0000000..682ca6e
--- /dev/null
@@ -0,0 +1,14 @@
+// PR c++/21336
+
+typedef __SIZE_TYPE__ size_t;
+template<class _T> void* operator new( size_t Size, _T&);
+struct B {
+  int a;
+  int* m() {
+    return new(a) int;
+  }
+};
+B* n() {
+  return new B();
+}
+