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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr44942.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
/* PR target/44942 */
2
 
3
#include <stdarg.h>
4
 
5
void
6
test1 (int a, int b, int c, int d, int e, int f, int g, long double h, ...)
7
{
8
  int i;
9
  va_list ap;
10
 
11
  va_start (ap, h);
12
  i = va_arg (ap, int);
13
  if (i != 1234)
14
    __builtin_abort ();
15
  va_end (ap);
16
}
17
 
18
void
19
test2 (int a, int b, int c, int d, int e, int f, int g, long double h, int i,
20
       long double j, int k, long double l, int m, long double n, ...)
21
{
22
  int o;
23
  va_list ap;
24
 
25
  va_start (ap, n);
26
  o = va_arg (ap, int);
27
  if (o != 1234)
28
    __builtin_abort ();
29
  va_end (ap);
30
}
31
 
32
void
33
test3 (double a, double b, double c, double d, double e, double f,
34
       double g, long double h, ...)
35
{
36
  double i;
37
  va_list ap;
38
 
39
  va_start (ap, h);
40
  i = va_arg (ap, double);
41
  if (i != 1234.0)
42
    __builtin_abort ();
43
  va_end (ap);
44
}
45
 
46
void
47
test4 (double a, double b, double c, double d, double e, double f, double g,
48
       long double h, double i, long double j, double k, long double l,
49
       double m, long double n, ...)
50
{
51
  double o;
52
  va_list ap;
53
 
54
  va_start (ap, n);
55
  o = va_arg (ap, double);
56
  if (o != 1234.0)
57
    __builtin_abort ();
58
  va_end (ap);
59
}
60
 
61
int
62
main ()
63
{
64
  test1 (0, 0, 0, 0, 0, 0, 0, 0.0L, 1234);
65
  test2 (0, 0, 0, 0, 0, 0, 0, 0.0L, 0, 0.0L, 0, 0.0L, 0, 0.0L, 1234);
66
  test3 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0L, 1234.0);
67
  test4 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0L, 0.0, 0.0L,
68
         0.0, 0.0L, 0.0, 0.0L, 1234.0);
69
  return 0;
70
}

powered by: WebSVN 2.1.0

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