diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/union1.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/union1.C | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/union1.C b/gcc/testsuite/g++.old-deja/g++.other/union1.C new file mode 100644 index 000000000..37424a1f4 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/union1.C @@ -0,0 +1,16 @@ +// { dg-do assemble } + +class A +{ + private: + int myInt; + + public: + A& operator = (int right) {myInt = right; return *this;} +}; + +union B +{ + char f1; + A f2; // { dg-bogus "" } non-copy assignment op is OK +}; |