This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linaro gcc mirror + linaro-local branches".
The branch, gcc-5-branch has been updated via 4a223d842e18ce7d8373185445788fc2a4388b54 (commit) from 257ea32277aa257c85e1e22b2e2e9b07da436938 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 4a223d842e18ce7d8373185445788fc2a4388b54 Author: alalaw01 alalaw01@138bc75d-0d04-0410-961f-82ee72b054a4 Date: Mon Jul 6 17:37:50 2015 +0000
Backport r225466: tests from 'Fix eipa_src AAPCS issue (PR target/65956)'
2015-05-05 Jakub Jelinek jakub@redhat.com
PR target/65956 * gcc.c-torture/execute/pr65956.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@225470 138bc75d-0d04-0410-961f-82ee72b054a4
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 98cefd1..54c8fb0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-07-06 Jakub Jelinek jakub@redhat.com + + PR target/65956 + * gcc.c-torture/execute/pr65956.c: New test. + 2015-07-06 Alan Lawrence alan.lawrence@arm.com
Backport from mainline r225465 diff --git a/gcc/testsuite/gcc.c-torture/execute/pr65956.c b/gcc/testsuite/gcc.c-torture/execute/pr65956.c new file mode 100644 index 0000000..f5c5eec --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr65956.c @@ -0,0 +1,67 @@ +/* PR target/65956 */ + +struct A { char *a; int b; long long c; }; +char v[3]; + +__attribute__((noinline, noclone)) void +fn1 (char *x, char *y) +{ + if (x != &v[1] || y != &v[2]) + __builtin_abort (); + v[1]++; +} + +__attribute__((noinline, noclone)) int +fn2 (char *x) +{ + asm volatile ("" : "+g" (x) : : "memory"); + return x == &v[0]; +} + +__attribute__((noinline, noclone)) void +fn3 (const char *x) +{ + if (x[0] != 0) + __builtin_abort (); +} + +static struct A +foo (const char *x, struct A y, struct A z) +{ + struct A r = { 0, 0, 0 }; + if (y.b && z.b) + { + if (fn2 (y.a) && fn2 (z.a)) + switch (x[0]) + { + case '|': + break; + default: + fn3 (x); + } + fn1 (y.a, z.a); + } + return r; +} + +__attribute__((noinline, noclone)) int +bar (int x, struct A *y) +{ + switch (x) + { + case 219: + foo ("+", y[-2], y[0]); + case 220: + foo ("-", y[-2], y[0]); + } +} + +int +main () +{ + struct A a[3] = { { &v[1], 1, 1LL }, { &v[0], 0, 0LL }, { &v[2], 2, 2LL } }; + bar (220, a + 2); + if (v[1] != 1) + __builtin_abort (); + return 0; +}
-----------------------------------------------------------------------
Summary of changes: gcc/testsuite/ChangeLog | 5 ++ gcc/testsuite/gcc.c-torture/execute/pr65956.c | 67 +++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr65956.c
hooks/post-receive