diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/opeq3.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.jason/opeq3.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/opeq3.C b/gcc/testsuite/g++.old-deja/g++.jason/opeq3.C new file mode 100644 index 00000000000..e290f7a21ba --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.jason/opeq3.C @@ -0,0 +1,15 @@ +// Bug: g++ generates code for assignment in invalid situations. +// Build don't link: + +class X { + int& a; +public: + X(int& i): a(i) { }; +}; + +void foo () +{ + int one=1, two=2; + X a(one), b(two); + a = b; // ERROR - no assignment semantics defined +}; |