X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fg%2B%2B.dg%2Fother%2Fconst2.C;fp=gcc%2Ftestsuite%2Fg%2B%2B.dg%2Fother%2Fconst2.C;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=86dde1e4559c10d367a7691b4f7a9db9a685fcf8;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/testsuite/g++.dg/other/const2.C b/gcc/testsuite/g++.dg/other/const2.C deleted file mode 100644 index 86dde1e4..00000000 --- a/gcc/testsuite/g++.dg/other/const2.C +++ /dev/null @@ -1,22 +0,0 @@ -// PR c++/3331: just because 'this' is readonly and bars[0].b is readonly -// doesn't mean that the result of the member reference is readonly. - -struct foo -{ - int a; - - struct bar - { int foo::* b ;}; - - static const bar bars[]; - - void bad () - { - this->*(bars[0].b) = 42; // { dg-bogus "read-only" "" } - } -}; - -const foo::bar foo::bars[] = { { &foo::a } }; - -int main () -{ }