1 // g++ 1.36.1 bug 900220_03
3 // g++ does not properly disambiguate calls to overloaded functions
4 // which are nearly identical except that one take a reference to a
5 // type `T' object and another takes a reference to a type `const T'
8 // (Note that the volatile stuff is commented out here because cfront
9 // does not yet grok volatile.)
11 // Cfront 2.0 passes this test.
13 // keywords: references, overloading, type qualifiers, pointers
16 int cc_call_count = 0;
17 //int vc_call_count = 0;
19 void overloaded (char&)
24 void overloaded (const char&)
29 //void overloaded (volatile char&)
38 //volatile char vc = 0;
42 //volatile char& vcr = vc;
45 overloaded (cc); // gets bogus error
46 //overloaded (vc); // OK
48 return (c_call_count != 1 || cc_call_count != 1 /* || vc_call_count != 1 */);
51 int main () { return test (); }