OSDN Git Service

Merge tree-ssa-20020619-branch into mainline.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / 20030731-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-dom3" } */
3   
4
5 struct rtx_def;
6 typedef struct rtx_def *rtx;
7 struct rtvec_def;
8 typedef struct rtvec_def *rtvec;
9 union tree_node;
10 typedef union tree_node *tree;
11 struct rtx_def
12 {
13   int code;
14   int mode;
15   unsigned int in_struct:1;
16 };
17 struct tree_common
18 {
19   int code;
20 };
21 struct tree_decl
22 {
23   rtx rtl;
24 };
25 union tree_node
26 {
27   struct tree_common common;
28   struct tree_decl decl;
29 };
30 rtx
31 store_expr (exp, target, want_value)
32      tree exp;
33      rtx target;
34      int want_value;
35 {
36   if (exp->common.code == 42)
37     abort ();
38   else if (queued_subexp_p (target))
39     {
40       blah (target->mode);
41       if (target->code)
42         abort ();
43     }
44   else
45     {
46       if (target->code && (__extension__({target;})->in_struct));
47     }
48
49   if ((target != (exp->decl.rtl
50                   ? (exp->decl.rtl
51                      ? exp->decl.rtl
52                      : (make_decl_rtl (exp, 0), exp->decl.rtl))
53                   : 0))
54       && expr_size (exp))
55     ;
56 }
57
58 /* All paths to the test "target != 0" occuring in the final IF statement
59    dereference target.  Thus target can not have the value zero at that
60    point and the test should have been eliminated.  */
61 /* ??? The dominator walker (A) doesn't merge this data at joins and
62    (B) only looks at immediate dominators, and only queued_subexp_p
63    immediately dominates the comparison in question.  We need something
64    stronger.  */
65 /* { dg-final { scan-tree-dump-times "target.*!= 0" 0 "dom3" { xfail *-*-* } } } */