Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.bugs / 900220_01.C
blobbda259df1e3aef8a50d4034403d246e52080ab62
1 // { dg-do run  }
2 // g++ 1.36.1 bug 900220_01
4 // Ref: 12.8
6 // Section 12.8 says:
8 //      "That is, X::operator=() will be generated only if no assignment
9 //      operation is explicitly declared and an object of class X is actually
10 //      assigned an object of class X (or an object of a class derived from X)
11 //      or if the address of X::operator= is taken.
13 // g++ does not allow you to take the address of an implicitly generated
14 // operator=
16 // keywords: operator=, implicit copy operator, operator&
18 struct struct0 {
19   int data_member;
22 typedef struct0& (struct0::*member_func_t) (const struct0&);
24 member_func_t member_func;
26 void global_function_0 (member_func_t member_f)
27 {                                               // { dg-bogus "" } ref from below
30 void global_function_1 ()
32   member_func = &struct0::operator=;            // { dg-bogus "" } 
34   global_function_0 (&struct0::operator=);      // { dg-bogus "" } 
37 int main () { return 0; }