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 2007-2012 Free Software Foundation, Inc. | 3 Copyright 2012 Free Software Foundation, Inc. |
4 | 4 |
5 This program is free software; you can redistribute it and/or modify | 5 This program is free software; you can redistribute it and/or modify |
6 it under the terms of the GNU General Public License as published by | 6 it under the terms of the GNU General Public License as published by |
7 the Free Software Foundation; either version 3 of the License, or | 7 the Free Software Foundation; either version 3 of the License, or |
8 (at your option) any later version. | 8 (at your option) any later version. |
9 | 9 |
10 This program is distributed in the hope that it will be useful, | 10 This program is distributed in the hope that it will be useful, |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 GNU General Public License for more details. | 13 GNU General Public License for more details. |
14 | 14 |
15 You should have received a copy of the GNU General Public License | 15 You should have received a copy of the GNU General Public License |
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ | 16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
17 | 17 |
18 struct s | 18 double sinfrob (double d); |
19 { | 19 double sinfrob16 (double d); |
20 int a; | |
21 int b; | |
22 }; | |
23 | 20 |
24 union u | 21 double sinblah (double d); |
25 { | 22 double sinblah16 (double d); |
26 int a; | |
27 float b; | |
28 }; | |
29 | 23 |
30 enum color { red, green, blue }; | 24 double sinhelper (double); |
| 25 long lsinhelper (double); |
31 | 26 |
32 static void | 27 double (*sinfunc) (double) = sinfrob; |
33 break_me (void) | 28 double (*sinfunc16) (double) = sinfrob16; |
34 { | |
35 } | |
36 | 29 |
37 static void | 30 double f = 1.0; |
38 call_me (int i, float f, struct s s, struct s *ss, union u u, enum color e) | 31 long i = 1; |
39 { | |
40 break_me (); | |
41 } | |
42 | 32 |
43 int | 33 int |
44 main (void) | 34 main (void) |
45 { | 35 { |
46 struct s s; | 36 double d = f; |
47 union u u; | 37 long l = i; |
48 | 38 |
49 s.a = 3; | 39 d = sinfrob16 (d); |
50 s.b = 5; | 40 d = sinfrob (d); |
51 u.a = 7; | 41 d = sinhelper (d); |
52 | 42 |
53 call_me (3, 5.0, s, &s, u, green); | 43 sinfunc = sinblah; |
| 44 sinfunc16 = sinblah16; |
54 | 45 |
55 return 0; | 46 d = sinblah (d); |
| 47 d = sinblah16 (d); |
| 48 l = lsinhelper (d); |
| 49 |
| 50 return l + i; |
56 } | 51 } |
OLD | NEW |