Automatic date update in version.in
[binutils-gdb.git] / gdb / testsuite / gdb.cp / fpointer.cc
blob007ea39307766d6661125fe5c77adfe132525b37
1 #include "stdio.h"
3 int foo(){
4 return 11;
7 int bar(){
8 return 12;
11 int bar(int){
12 printf ("bar(int)\n");
13 return 13;
16 int bar(char){
17 printf ("bar(char)\n");
18 return 14;
21 int (*p1)() = &foo;
22 int (*p2)() = &bar;
23 int (*p[2])() = {p1,p2};
25 int (*p3)(int) = &bar;
26 int (*p4)(char) = &bar;
28 int main ()
30 p1 ();
31 p2 ();
33 p[0]();
34 p[1]();
36 p3 ('a');
37 p4 (1);
39 return 0;