| OLD | NEW |
| 1 /* This testcase is part of GDB, the GNU debugger. | 1 /* This testcase is part of GDB, the GNU debugger. |
| 2 | 2 |
| 3 Copyright 1993-1995, 1998-2001, 2004, 2007-2012 Free Software | 3 Copyright 1993-1995, 1998-2001, 2004, 2007-2012 Free Software |
| 4 Foundation, Inc. | 4 Foundation, Inc. |
| 5 | 5 |
| 6 This program is free software; you can redistribute it and/or modify | 6 This program is free software; you can redistribute it and/or modify |
| 7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
| 8 the Free Software Foundation; either version 3 of the License, or | 8 the Free Software Foundation; either version 3 of the License, or |
| 9 (at your option) any later version. | 9 (at your option) any later version. |
| 10 | 10 |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 | 634 |
| 635 struct struct_with_fnptr | 635 struct struct_with_fnptr |
| 636 { | 636 { |
| 637 int (*func) PARAMS((int)); | 637 int (*func) PARAMS((int)); |
| 638 }; | 638 }; |
| 639 | 639 |
| 640 struct struct_with_fnptr function_struct = { doubleit }; | 640 struct struct_with_fnptr function_struct = { doubleit }; |
| 641 | 641 |
| 642 struct struct_with_fnptr *function_struct_ptr = &function_struct; | 642 struct struct_with_fnptr *function_struct_ptr = &function_struct; |
| 643 | 643 |
| 644 int * |
| 645 voidfunc (void) |
| 646 { |
| 647 static int twentythree = 23; |
| 648 return &twentythree; |
| 649 } |
| 650 |
| 644 /* Gotta have a main to be able to generate a linked, runnable | 651 /* Gotta have a main to be able to generate a linked, runnable |
| 645 executable, and also provide a useful place to set a breakpoint. */ | 652 executable, and also provide a useful place to set a breakpoint. */ |
| 646 | 653 |
| 647 int main () | 654 int main () |
| 648 { | 655 { |
| 649 #ifdef usestubs | |
| 650 set_debug_traps(); | |
| 651 breakpoint(); | |
| 652 #endif | |
| 653 malloc(1); | 656 malloc(1); |
| 654 t_double_values(double_val1, double_val2); | 657 t_double_values(double_val1, double_val2); |
| 655 t_structs_c(struct_val1); | 658 t_structs_c(struct_val1); |
| 656 return 0 ; | 659 return 0 ; |
| 657 } | 660 } |
| 658 | 661 |
| 659 static int | 662 static int |
| 660 Lcallfunc (int arg) | 663 Lcallfunc (int arg) |
| 661 { | 664 { |
| 662 return arg + 1; | 665 return arg + 1; |
| 663 } | 666 } |
| 664 | 667 |
| 665 int | 668 int |
| 666 callfunc (int (*func) (int value), int value) | 669 callfunc (int (*func) (int value), int value) |
| 667 { | 670 { |
| 668 return Lcallfunc (0) * 0 + func (value) * 2; | 671 return Lcallfunc (0) * 0 + func (value) * 2; |
| 669 } | 672 } |
| OLD | NEW |