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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [pr34146-2.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 c/34146 */
2
/* { dg-do compile } */
3
/* { dg-options "-O2 -fdump-tree-gimple" } */
4
 
5
struct A
6
{
7
  int f1, f2, f3;
8
};
9
 
10
struct B
11
{
12
  struct A g1, g2;
13
};
14
 
15
struct C
16
{
17
  struct B h1, h2;
18
};
19
 
20
typedef union
21
{
22
  struct C c;
23
  char s[4];
24
  long int a;
25
} T;
26
 
27
void
28
foo (void)
29
{
30
  T t = (T) { { { { 0, 0, 0 }, { 0, 0, 0 } }, { { 0, 0, 0 }, { 0, 0, 0 } } } };
31
  test (&t);
32
}
33
 
34
void
35
bar (void)
36
{
37
  T t = (T) { { { { 0, 0, 0 }, (struct A) { 0, 0, 0 } },
38
              (struct B) { (struct A) { 0, 0, 0 }, { 0, 0, 0 } } } };
39
  test (&t);
40
}
41
 
42
void
43
baz (void)
44
{
45
  T t = (T) { { { { 0, 0, 0 }, (struct A) { 1, 1, 1 } },
46
              (struct B) { (struct A) { 0, 0, 0 }, { 1, 1, 1 } } } };
47
  test (&t);
48
}
49
 
50
/* { dg-final { scan-tree-dump-not "t = D" "gimple"} } */
51
/* { dg-final { scan-tree-dump-not "t\.c\.h\[12\] = D" "gimple"} } */
52
/* { dg-final { scan-tree-dump-not "\.g\[12\] = D" "gimple"} } */
53
/* { dg-final { cleanup-tree-dump "gimple" } } */

powered by: WebSVN 2.1.0

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