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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [20030814-6.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O1 -fdump-tree-dom3" } */
3
 
4
extern void abort (void);
5
union tree_node;
6
typedef union tree_node *tree;
7
enum tree_code
8
{
9
  LAST_AND_UNUSED_TREE_CODE
10
};
11
extern const char tree_code_type[];
12
struct tree_common
13
{
14
  enum tree_code code:8;
15
};
16
struct tree_type
17
{
18
  double alias_set;
19
};
20
union tree_node
21
{
22
  struct tree_common common;
23
  struct tree_type type;
24
};
25
long
26
foo (t, set)
27
     tree t;
28
     double set;
29
{
30
  if (tree_code_type[t->common.code] != 't')
31
    abort ();
32
 
33
  t->type.alias_set = set;
34
 
35
  if (t->common.code == 42)
36
    return 1;
37
  else
38
    return 0;
39
}
40
/* There should be precisely one load of common.code.  If there is
41
   more than one, then the dominator optimizations failed.  */
42
/* ??? Will fail until we properly distinguish member stores.  At
43
   present the write to type.alias_set kills the previous load.  */
44
/* { dg-final { scan-tree-dump-times "common.code" 1 "dom3" { xfail *-*-* } } } */
45
/* { dg-final { cleanup-tree-dump "dom3" } } */

powered by: WebSVN 2.1.0

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