aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40797.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40797.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40797.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40797.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40797.c
new file mode 100644
index 000000000..001d1b507
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40797.c
@@ -0,0 +1,16 @@
+typedef struct str { short x, y;} S;
+
+static short
+bar (short ch, short sl, short sr, short tl, short tr)
+{
+ return 0;
+}
+
+void
+foo (short ch, S *pi, short nc, S *po)
+{
+ short clo, chi, lo, hi;
+
+ po->x = bar (ch, clo, chi, pi[lo].x, pi[hi].x);
+ po->y = bar (ch, clo, chi, pi[lo].y, pi[hi].y);
+}