Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/pr69270-2.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-dce2 -w" } */
3
4 /* The arithmetic using usecount should be gone. */
5 /* { dg-final { scan-tree-dump-times "usecount_\[0-9\]+ = usecount_\[0-9\]+ . 1;" 0 "dce2"} } */
6
7 typedef union tree_node *tree;
8 typedef union gimple_statement_d *gimple;
9 extern const int tree_code_type[];
10 union tree_node
11 {
12 int code:16;
13 };
14 typedef struct immediate_use_iterator_d
15 {
16 }
17 imm_use_iterator;
18 int arf (void);
19 int gimple_debug_bind_p (gimple);
20 int gimple_bb (gimple);
21 tree gimple_assign_rhs_to_tree (void);
22 int is_gimple_min_invariant (tree);
23 tree unshare_expr (tree);
24 void
25 insert_debug_temp_for_var_def (gimple stmt)
26 {
27 gimple def_stmt = ((void *) 0);
28 int usecount = 0;
29 tree value = ((void *) 0);
30 for (; arf ();)
31 {
32 if (!gimple_debug_bind_p (stmt))
33 continue;
34 if (usecount++)
35 break;
36 unsigned char no_value = 0;
37 if (!gimple_bb (def_stmt))
38 no_value = 1;
39 if (!no_value)
40 value = gimple_assign_rhs_to_tree ();
41 }
42 if (value)
43 {
44 if ((tree_code_type[(int) (((value)->code))] == 42)
45 || (usecount == 1 && (is_gimple_min_invariant (value))))
46 value = unshare_expr (value);
47 }
48 }
49
50