diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2007-11-02 11:57:05 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@libertysurf.fr> | 2007-11-02 11:57:05 +0000 |
commit | 20b72f5455fe8d013ffbadbf671f14561c19986c (patch) | |
tree | 0980ffbd57a5fa5758c6d84b09b94b00f12699b7 /gcc/testsuite/gcc.c-torture/compile | |
parent | 3fae389500e088219dc58d89127f0c18e5ee3636 (diff) |
PR rtl-optimization/28062
* gcc.c-torture/compile/20071102-1.c: New test.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@129846 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20071102-1.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/20071102-1.c b/gcc/testsuite/gcc.c-torture/compile/20071102-1.c new file mode 100644 index 00000000000..03b015628cd --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20071102-1.c @@ -0,0 +1,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); +} |