]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - gcc/testsuite/g++.old-deja/g++.jason/new.C
Imported gcc-4.4.3
[msp430-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / new.C
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/new.C b/gcc/testsuite/g++.old-deja/g++.jason/new.C
deleted file mode 100644 (file)
index ce86569..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Bug: new doesn't make sure that the count is an integral value.
-
-#include <new>
-extern "C" int printf (const char *, ...);
-extern "C" void *malloc (size_t);
-size_t s;
-
-void * operator new (size_t siz) throw (std::bad_alloc) {
-  if (s == 0)
-    s = siz;
-  else
-    s = (s != siz);
-  return malloc (siz);
-}
-
-int main()
-{
-  s = 0;
-
-  float f = 3;
-  int* b1 = new int[(int)f];
-  int* b2 = new int[f];                // ERROR - new requires integral size
-
-  return s;
-}