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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [pr45144.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-optimized" } */
3
/* { dg-require-effective-target int32plus } */
4
 
5
void baz (unsigned);
6
 
7
extern unsigned buf[];
8
 
9
struct A
10
{
11
  unsigned a1:10;
12
  unsigned a2:3;
13
  unsigned:19;
14
};
15
 
16
union TMP
17
{
18
  struct A a;
19
  unsigned int b;
20
};
21
 
22
static unsigned
23
foo (struct A *p)
24
{
25
  union TMP t;
26
  struct A x;
27
 
28
  x = *p;
29
  t.a = x;
30
  return t.b;
31
}
32
 
33
void
34
bar (unsigned orig, unsigned *new)
35
{
36
  struct A a;
37
  union TMP s;
38
 
39
  s.b = orig;
40
  a = s.a;
41
  if (a.a1)
42
    baz (a.a2);
43
  *new = foo (&a);
44
}
45
 
46
/* { dg-final { scan-tree-dump " = VIEW_CONVERT_EXPR<unsigned int>\\(a\\);" "optimized"} } */
47
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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