X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fg%2B%2B.dg%2Fother%2Fptrmem1.C;fp=gcc%2Ftestsuite%2Fg%2B%2B.dg%2Fother%2Fptrmem1.C;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=fa9115e506c1e8fbad42edff8afab7e5027c8677;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/testsuite/g++.dg/other/ptrmem1.C b/gcc/testsuite/g++.dg/other/ptrmem1.C deleted file mode 100644 index fa9115e5..00000000 --- a/gcc/testsuite/g++.dg/other/ptrmem1.C +++ /dev/null @@ -1,66 +0,0 @@ -// { dg-do run } - -// Copyright (C) 2001 Free Software Foundation, Inc. -// Contributed by Nathan Sidwell 31 Dec 2001 - -// PR 4379. We created pointers to member references and pointers to -// member fields when we shouldn't have. - -int gs; -int gm; - -struct D { - D () :m (gm) {} - - int &m; - static int &s; - - int Foo (); -}; - -int &D::s = gs; - -template int f1(T x) -{ - return x != &gm; -} -template int f2(T x) -{ - return x != &gs; -} - -int D::Foo () -{ - int r; - - if (f1( &(D::m))) - return 3; - - if (f2( &D::s)) - return 1; - if (f2( &(D::s))) - return 2; - return 0; -} - -int Foo () -{ - if (f2( &D::s)) - return 4; - if (f2( &(D::s))) - return 5; - return 0; -} - -int main () -{ - D d; - int r = d.Foo (); - if (r) - return r; - r = Foo (); - if (r) - return r; - return 0; - -}