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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr30665-2.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* PR target/30665: bug in cris.md peephole2 condition.
2
   Original reduced testcase (fails on 3.2.1 derivate, not on trunk).  */
3
/* { dg-do run } */
4
 
5
extern void abort (void);
6
extern void exit (int);
7
 
8
struct t
9
{
10
  unsigned int a : 12;
11
  unsigned int b  : 12;
12
  unsigned int dummy1 : 8;
13
};
14
 
15
struct area
16
{
17
  int xa;
18
  int xb;
19
};
20
 
21
struct c
22
{
23
  struct area ii;
24
};
25
 
26
static struct c c;
27
 
28
void  __attribute__ ((__noinline__)) g(int a)
29
{
30
  if (a != 79)
31
    abort ();
32
}
33
 
34
void  __attribute__ ((__noinline__)) h(struct t tt)
35
{
36
  if (tt.a != 20 || tt.b != 79)
37
    abort ();
38
}
39
 
40
void __attribute__ ((__noinline__)) s(void);
41
 
42
int main(int argc, char **argv)
43
{
44
  c.ii.xa = 20;
45
  c.ii.xb = 79;
46
 
47
  s();
48
 
49
  exit (0);
50
}
51
 
52
void __attribute__ ((__noinline__)) s(void)
53
{
54
  struct t ii_x = { .a = c.ii.xa, .b = c.ii.xb };
55
  g(c.ii.xb);
56
  h(ii_x);
57
}

powered by: WebSVN 2.1.0

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