PR target/40797
authorolegendo <olegendo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Mar 2013 01:04:13 +0000 (01:04 +0000)
committerolegendo <olegendo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Mar 2013 01:04:13 +0000 (01:04 +0000)
* gcc.c-torture/compile/pr40797.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196590 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr40797.c [new file with mode: 0644]

index bdc4b9c..e589f97 100644 (file)
@@ -1,3 +1,8 @@
+2013-03-11  Oleg Endo  <olegendo@gcc.gnu.org>
+
+       PR target/40797
+       * gcc.c-torture/compile/pr40797.c: New.
+
 2013-03-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        * gcc.dg/pr44194-1.c: Skip compilation on hppa*64*-*-*.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr40797.c b/gcc/testsuite/gcc.c-torture/compile/pr40797.c
new file mode 100644 (file)
index 0000000..001d1b5
--- /dev/null
@@ -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);
+}