Cygwin: cygwin_GetCommandLineW/A: don't rely on __argv[0] content
[newlib-cygwin.git] / libgloss / testsuite / libgloss.all / varargs2.c
blob9e590fcde016e45f10db190fbaa79e158d3fadeb
1 /* Oki bug report [OKI013]
3 Variable argments test failed.
5 Execution result.
6 val1, val2 = 1, 0
7 val1, val2 = 2, 0
8 val1, val2 = 3, 0
10 Note, this test case for for traditional style C code.
14 #include <stdio.h>
15 #include <varargs.h>
16 int func();
18 main()
20 func(1., 2., 3.);
23 func(va_alist)
24 va_dcl
26 va_list p;
27 double val1, val2;
28 int j;
30 va_start(p);
31 for (j = 1; j <= 3; ++j){
32 dequals((double)j, va_arg(p, double));
34 va_end(p);
35 return (p);
38 dequals(double val1, double val2)
40 iprintf ("val1 is %d, val2 is %d\n", (int)val1, (int)val2);
41 if (val1 == val2)
42 pass ("varargs2 [OKI013]");
43 else
44 fail ("varargs2 [OKI013]");
46 fflush (stdout);
47 return;