aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr49799.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/pr49799.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/pr49799.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/pr49799.c b/gcc-4.9/gcc/testsuite/gcc.dg/pr49799.c
new file mode 100644
index 000000000..61ac261be
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/pr49799.c
@@ -0,0 +1,25 @@
+/* PR rtl-optimization/49799 */
+/* { dg-do assemble } */
+/* { dg-options "-O2 -w" } */
+
+static __inline int bar(int a)
+{
+ int tmp;
+
+ if (a <= 0) a ^= 0xFFFFFFFF;
+
+ return tmp - 1;
+}
+
+void foo(short *K)
+{
+ short tmp;
+ short *pptr, P[14];
+
+ pptr = P;
+ tmp = bar(*K);
+ *pptr = (*K << tmp) >> 16;
+
+ if (*P < tmp)
+ *K++ = 0;
+}