X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.jason%2Fnew.C;fp=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.jason%2Fnew.C;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=ce8656960785b94e373f20185d894ce07ee825bd;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git 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 index ce865696..00000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/new.C +++ /dev/null @@ -1,25 +0,0 @@ -// Bug: new doesn't make sure that the count is an integral value. - -#include -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; -}