1// { dg-do run  }
2// GROUPS passed overloading
3// Check that calls to the correct overloaded virtual
4// functions are generated even where the type of the formal
5// arguments for the overloadings are similar or related.
6
7extern "C" int printf (const char *, ...);
8
9int proper_method_called = 0;
10
11struct base {
12	int member;
13	virtual void method (char)
14	{
15	}
16	virtual void method (char *)
17	{
18	}
19};
20
21struct derived : public base {
22	int member;
23	virtual void method (char)
24	{
25	}
26	virtual void method (char *)
27	{
28		proper_method_called++;
29	}
30};
31
32char *message;
33
34int main ()
35{
36	derived derived_object;
37
38	derived_object.method (message);
39
40	if (proper_method_called != 1)
41	  { printf ("FAIL\n"); return 1; }
42	else
43	  printf ("PASS\n");
44}
45