This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Add testcase for PR rtl-optimization/28062


The C testcase distilled by Andrew now passes everywhere.

Tested on i586-suse-linux, applied on all branches.


2007-11-02  Eric Botcazou  <ebotcazou@libertysurf.fr>

	PR rtl-optimization/28062
	* gcc.c-torture/compile/20071102-1.c: New test.


-- 
Eric Botcazou
/* 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);
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]