X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.law%2Foperators32.C;fp=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.law%2Foperators32.C;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=fcf01bc40c423639a301a3fdb6b1b6b01fa52f84;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/testsuite/g++.old-deja/g++.law/operators32.C b/gcc/testsuite/g++.old-deja/g++.law/operators32.C deleted file mode 100644 index fcf01bc4..00000000 --- a/gcc/testsuite/g++.old-deja/g++.law/operators32.C +++ /dev/null @@ -1,55 +0,0 @@ -// Build don't link: -// GROUPS passed operators -#include - -// -// ffrees space allocated for N-D array -// - -template -void ffree(long rows, T** array) -{ -for( long i = 0; i < rows; i++ ) - delete [] array[i]; // delete row -delete [] array; // delete outer array -} - -template -T* allocate1d(long size, T*& array) -{ -return array = new T[size]; -} - -template -T** allocate2d(long d1, long d2, T**& array) -{ -if( allocate1d(d1, array) != 0 ) - { - for( long i = 0; i < d1; i++ ) - { - if( allocate1d(d2, array[i]) == 0 ) - { - ffree(i,array); - return array; - } - } - } -return array; -} - -int main() -{ -long d1 = 3, d2 = 4; -class foo -{ -public: -foo() {std::cout << "foo created" << std::endl; } - -~foo() {std::cout << "foo deleted" << std::endl; } -}; - -foo **f2; -allocate2d(d1, d2, f2);// ERROR - type.*// ERROR - trying to.* -ffree(d1, f2);// ERROR - type.*// ERROR - trying to.* - -}