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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [compat/] [scalar-return-4_y.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
#include <stdarg.h>
2
 
3
#include "compat-common.h"
4
 
5
#ifdef SKIP_VA
6
const int test_va = 0;
7
#else
8
const int test_va = 1;
9
#endif
10
 
11
#define T(NAME, TYPE, INITVAL)                                  \
12
extern TYPE g01##NAME;                                          \
13
                                                                \
14
extern void check##NAME (TYPE x, TYPE v);                       \
15
                                                                \
16
void                                                            \
17
init##NAME (TYPE *p, TYPE v)                                    \
18
{                                                               \
19
  *p = v + INITVAL;                                             \
20
}                                                               \
21
                                                                \
22
void                                                            \
23
checkg##NAME (void)                                             \
24
{                                                               \
25
  check##NAME (g01##NAME,  1+INITVAL);                          \
26
}                                                               \
27
                                                                \
28
TYPE                                                            \
29
test0##NAME (void)                                              \
30
{                                                               \
31
  return g01##NAME;                                             \
32
}                                                               \
33
                                                                \
34
TYPE                                                            \
35
test1##NAME (TYPE x01)                                          \
36
{                                                               \
37
  return x01;                                                   \
38
}
39
 
40
#ifndef SKIP_COMPLEX_INT
41
T(cc, _Complex char, CINT (0, 1))
42
T(cs, _Complex short, CINT (1, 2))
43
#endif
44
T(cf, _Complex float, CDBL (1.0, 2.0))

powered by: WebSVN 2.1.0

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