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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr51695.c] - Blame information for rev 749

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

Line No. Rev Author Line
1 689 jeremybenn
/* PR debug/51695 */
2
/* { dg-do compile { target { int32plus } } } */
3
/* { dg-options "-O2 -g" } */
4
 
5
typedef struct
6
{
7
  struct { unsigned int t1, t2, t3, t4, t5, t6; } t;
8
  int p;
9
  struct { double X, Y, Z; } r;
10
} T;
11
typedef struct { T *h; } S;
12
 
13
static unsigned int v = 0x12345678;
14
 
15
int
16
foo (void)
17
{
18
  v = (v & 0x80000000) ? ((v << 1) ^ 0xa398655d) : (v << 1);
19
  return 0;
20
}
21
 
22
double
23
bar (void)
24
{
25
  unsigned int o;
26
  v = (v & 0x80000000) ? ((v << 1) ^ 0xa398655d) : (v << 1);
27
  o = v & 0xffff;
28
  return (double) o / 32768.0;
29
}
30
 
31
int
32
baz (void)
33
{
34
  foo ();
35
  return 0;
36
}
37
 
38
void
39
test (S *x)
40
{
41
  T *t = x->h;
42
  t->t.t1 = foo ();
43
  t->t.t2 = foo ();
44
  t->t.t3 = foo ();
45
  t->t.t4 = foo ();
46
  t->t.t5 = foo ();
47
  t->t.t6 = foo ();
48
  t->p = baz ();
49
  t->r.X = bar ();
50
  t->r.Y = bar ();
51
  t->r.Z = bar ();
52
}

powered by: WebSVN 2.1.0

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