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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [ia64/] [float80-varargs-1.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 319 jeremybenn
/* Test for a bug with passing __float80 in varargs.  The __float80
2
   value was wrongly passed, leading to an abort.  */
3
/* Origin: Joseph Myers <joseph@codesourcery.com> */
4
/* { dg-do run } */
5
/* { dg-options "" } */
6
 
7
#include <stdarg.h>
8
 
9
extern void abort (void);
10
extern void exit (int);
11
 
12
__float80 s = 1.234L;
13
__float80 d;
14
 
15
void vf (int a0, ...);
16
 
17
int
18
main (void)
19
{
20
  vf (0, s);
21
  if (d != s)
22
    abort ();
23
  exit (0);
24
}
25
 
26
void
27
vf (int a0, ...)
28
{
29
  va_list ap;
30
  va_start (ap, a0);
31
  d = va_arg (ap, __float80);
32
  va_end (ap);
33
}

powered by: WebSVN 2.1.0

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