* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git] / gcc / testsuite / gcc.dg / struct-ret-1.c
blob23c9e98130bb115751b7203f7dcb43ebd26981dc
1 /* { dg-do run { target hppa*-*-* } } */
2 /* { dg-options { -O2 } { target hppa*-*-* } } */
3 extern void abort (void);
4 extern void exit (int);
5 typedef struct {
6 int x;
7 int y;
8 } point_t;
10 int main(int argc, char *argv[]);
11 int printPoints(point_t a, point_t b);
12 point_t toPoint(int x1, int y1);
14 int
15 main(int argc, char *argv[])
18 if (printPoints(toPoint(0, 0), toPoint(1000, 1000)) != 1)
19 abort();
20 else
21 exit(0);
23 return 0;
26 int
27 printPoints(point_t a, point_t b)
29 if (a.x != 0
30 || a.y != 0
31 || b.x != 1000
32 || b.y != 1000)
33 return 0;
34 else
35 return 1;
38 point_t
39 toPoint(int x1, int y1)
41 point_t p;
43 p.x = x1;
44 p.y = y1;
46 return p;