1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-forwprop1 -fno-short-enums" } */
5 typedef union tree_node
*tree
;
10 extern unsigned char tree_contains_struct
[MAX_TREE_CODES
][64];
13 __extension__
enum tree_code code
:16;
14 unsigned public_flag
:1;
16 enum tree_node_structure_enum
20 struct tree_decl_with_vis
22 unsigned comdat_flag
:1;
26 struct tree_base base
;
27 struct tree_decl_with_vis decl_with_vis
;
32 struct varpool_node
*next_needed
, *prev_needed
;
33 unsigned externally_visible
:1;
35 extern struct varpool_node
*varpool_nodes_queue
;
37 struct pointer_set_t
*pointer_set_create (void);
38 __inline__
static unsigned char
39 varpool_externally_visible_p (struct varpool_node
*vnode
,
40 unsigned char aliased
)
42 struct varpool_node
*alias
;
43 if (!(( { __typeof (vnode
->decl
) const __t
= (vnode
->decl
); __t
;})->decl_with_vis
.comdat_flag
)
44 && !((vnode
->decl
)->base
.public_flag
))
51 unsigned char pointer_set_contains (struct pointer_set_t
*, struct varpool_node
*);
54 function_and_variable_visibility (unsigned char whole_program
)
56 struct cgraph_node
*node
;
57 struct varpool_node
*vnode
;
58 struct pointer_set_t
*aliased_vnodes
= pointer_set_create ();
59 for (vnode
= varpool_nodes_queue
; vnode
; vnode
= vnode
->next_needed
)
60 if (varpool_externally_visible_p
61 (vnode
, pointer_set_contains (aliased_vnodes
, vnode
)))
62 vnode
->externally_visible
= 1;
65 /* { dg-final { scan-tree-dump-not "& 255" "forwprop1"} } */