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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20001026-1.c] - Blame information for rev 841

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

Line No. Rev Author Line
1 149 jeremybenn
extern void abort (void);
2
 
3
typedef struct {
4
  long r[(19 + sizeof (long))/(sizeof (long))];
5
} realvaluetype;
6
 
7
typedef void *tree;
8
 
9
static realvaluetype
10
real_value_from_int_cst (tree x, tree y)
11
{
12
  realvaluetype r;
13
  int i;
14
  for (i = 0; i < sizeof(r.r)/sizeof(long); ++i)
15
    r.r[i] = -1;
16
  return r;
17
}
18
 
19
struct brfic_args
20
{
21
  tree type;
22
  tree i;
23
  realvaluetype d;
24
};
25
 
26
static void
27
build_real_from_int_cst_1 (data)
28
     void * data;
29
{
30
  struct brfic_args *args = (struct brfic_args *) data;
31
  args->d = real_value_from_int_cst (args->type, args->i);
32
}
33
 
34
int main()
35
{
36
  struct brfic_args args;
37
 
38
  __builtin_memset (&args, 0, sizeof(args));
39
  build_real_from_int_cst_1 (&args);
40
 
41
  if (args.d.r[0] == 0)
42
    abort ();
43
  return 0;
44
}

powered by: WebSVN 2.1.0

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