OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [920501-8.c] - Blame information for rev 297

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
#include <stdio.h>
2
#include <stdarg.h>
3
 
4
char buf[50];
5
int
6
va (int a, double b, int c, ...)
7
{
8
  va_list ap;
9
  int d, e, f, g, h, i, j, k, l, m, n, o, p;
10
  va_start (ap, c);
11
 
12
  d = va_arg (ap, int);
13
  e = va_arg (ap, int);
14
  f = va_arg (ap, int);
15
  g = va_arg (ap, int);
16
  h = va_arg (ap, int);
17
  i = va_arg (ap, int);
18
  j = va_arg (ap, int);
19
  k = va_arg (ap, int);
20
  l = va_arg (ap, int);
21
  m = va_arg (ap, int);
22
  n = va_arg (ap, int);
23
  o = va_arg (ap, int);
24
  p = va_arg (ap, int);
25
 
26
  sprintf (buf,
27
           "%d,%f,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
28
           a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
29
  va_end (ap);
30
}
31
 
32
main()
33
{
34
  va (1, 1.0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
35
  if (strcmp ("1,1.000000,2,3,4,5,6,7,8,9,10,11,12,13,14,15", buf))
36
    abort();
37
  exit(0);
38
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.