diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.law/ctors5.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.law/ctors5.C | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors5.C b/gcc/testsuite/g++.old-deja/g++.law/ctors5.C new file mode 100644 index 00000000000..3fc58041192 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.law/ctors5.C @@ -0,0 +1,33 @@ +// Build don't link: +// GROUPS passed constructors +// ctors file +// Subject: bug in handling static const object of the enclosing class +// Date: Tue, 1 Sep 92 10:38:44 EDT + +class X +{ + private: + int x; + public: + static const X x0; + X( int ); +}; // ERROR - candidate + +class Y +{ + private: + X xx; + public: + Y(); +} +X::X( int xi ) +{// ERROR - return.* + x = xi; +} + +const X X::x0( 0 ); + +Y::Y() +{// ERROR - no mat + xx = X::x0; +} |