From: Andrew Pinski Date: Sat, 30 Aug 2014 22:35:43 +0000 (+0000) Subject: 20140828-1.c: New testcase. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e4b8a410133f266ce374608cc0f9720e55601281;p=gcc.git 20140828-1.c: New testcase. 2014-08-30 Andrew Pinski * gcc.c-torture/execute/20140828-1.c: New testcase. From-SVN: r214760 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b2f1bb2fcdd..3ce39a55015 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2014-08-30 Andrew Pinski + + * gcc.c-torture/execute/20140828-1.c: New testcase. + 2014-08-29 DJ Delorie * lib/target-supports.exp (check_effective_target_size32plus): diff --git a/gcc/testsuite/gcc.c-torture/execute/20140828-1.c b/gcc/testsuite/gcc.c-torture/execute/20140828-1.c new file mode 100644 index 00000000000..5eeb8e01aed --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20140828-1.c @@ -0,0 +1,22 @@ +short *f(short *a, int b, int *d) __attribute__((noinline,noclone)); + +short *f(short *a, int b, int *d) +{ + short c = *a; + a++; + c = b << c; + *d = c; + return a; +} + +int main(void) +{ + int d; + short a[2]; + a[0] = 0; + if (f(a, 1, &d) != &a[1]) + __builtin_abort (); + if (d != 1) + __builtin_abort (); + return 0; +}