summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/pr46049.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/vect/pr46049.c')
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr46049.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/pr46049.c b/gcc/testsuite/gcc.dg/vect/pr46049.c
new file mode 100644
index 00000000000..90020681ef2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr46049.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+
+typedef __INT16_TYPE__ int16_t;
+typedef __INT32_TYPE__ int32_t;
+
+static inline int32_t bar (int16_t x, int16_t y)
+{
+ return x * y;
+}
+
+void foo (int16_t i, int16_t *p, int16_t x)
+{
+ while (i--)
+ {
+ *p = bar (*p, x) >> 15;
+ p++;
+ *p = bar (*p, x) >> 15;
+ p++;
+ }
+}
+/* { dg-final { cleanup-tree-dump "vect" } } */