aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr120741.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/pr120741.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/pr120741.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr120741.c b/gcc/testsuite/gcc.target/i386/pr120741.c
new file mode 100644
index 0000000..b59a58c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr120741.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mstack-arg-probe" } */
+
+short __mingw_swformat_format;
+__builtin_va_list __mingw_swformat_arg;
+int __mingw_swformat_fc;
+typedef struct {
+ void *fp;
+ int bch[1024];
+} _IFP;
+void __mingw_swformat(_IFP *s) {
+ if (s->fp)
+ while (__mingw_swformat_format)
+ if (__mingw_swformat_fc == 'A')
+ *__builtin_va_arg(__mingw_swformat_arg, double *) = 0;
+}
+void
+__mingw_vswscanf (void)
+{
+ _IFP ifp;
+ __mingw_swformat(&ifp);
+}