aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr79574-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr79574-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr79574-2.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr79574-2.c b/gcc/testsuite/gcc.dg/pr79574-2.c
new file mode 100644
index 00000000000..995dff40174
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr79574-2.c
@@ -0,0 +1,33 @@
+/* PR rtl-optimization/79574 */
+/* { dg-do compile } */
+/* { dg-options "-Os --param gcse-cost-distance-ratio=2147483647" } */
+
+#include "stdarg.h"
+
+int buf[100];
+int buf1[10];
+
+int rd (int *pppp, int n, ...)
+{
+ va_list argp;
+ int *p;
+ int i;
+ int res;
+
+ va_start (argp, n);
+ for (; n > 0; n--)
+ va_arg (argp, double);
+ p = va_arg (argp, int *);
+ i = va_arg (argp, int);
+
+ res = p[i];
+ __builtin_printf ("%d\n", res);
+
+ return res;
+}
+
+int mpx_test (int argc, const char **argv)
+{
+ rd (buf1, 2, 10.0d, 10.0d, buf, 100, buf1);
+ return 0;
+}