aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20071102-1.c
blob: 03b015628cd3f1c0a5b930854833d2fd1f27f3fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* PR rtl-optimization/28062 */
/* Original testcase by Martin Michlmayr <tbm@cyrius.com> */
/* C testcase by Andrew Pinski <pinskia@gcc.gnu.org> */

struct _NSPoint
{
  float x;
  float y;
};

typedef struct _NSPoint NSPoint;

static inline NSPoint
NSMakePoint (float x, float y)
{
  NSPoint point;
  point.x = x;
  point.y = y;
  return point;
}

static inline NSPoint
RelativePoint (NSPoint point, NSPoint refPoint)
{
  return NSMakePoint (refPoint.x + point.x, refPoint.y + point.y);
}

NSPoint g(NSPoint refPoint)
{
  float pointA, pointB;
  return RelativePoint (NSMakePoint (0, pointA), refPoint);
}