diff options
author | Richard Guenther <rguenther@suse.de> | 2009-05-28 13:24:16 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-05-28 13:24:16 +0000 |
commit | b45d27197ff43c93ec0ffbb0303ca9a408e4e555 (patch) | |
tree | b52d3f9e34439d91ac7faf7bf6abb10bcb34c45c /gcc/testsuite/gcc.c-torture | |
parent | 554223b6bde54d4a0365748ff9bccd78378969fd (diff) | |
download | gcc-b45d27197ff43c93ec0ffbb0303ca9a408e4e555.tar.gz |
tree-ssa-alias.c (ao_ref_init): New function.
2009-05-28 Richard Guenther <rguenther@suse.de>
* tree-ssa-alias.c (ao_ref_init): New function.
(ao_ref_base): Likewise.
(ao_ref_base_alias_set): Likewise.
(ao_ref_alias_set): Likewise.
(refs_may_alias_p_1): Change signature.
(refs_may_alias_p): Adjust.
(refs_anti_dependent_p): Likewise.
(refs_output_dependent_p): Likewise.
(call_may_clobber_ref_p_1): Change signature.
(call_may_clobber_ref_p): Adjust.
(stmt_may_clobber_ref_p_1): New function split out from ...
(stmt_may_clobber_ref_p): ... here.
(maybe_skip_until): Adjust signature.
(get_continuation_for_phi): Likewise.
(walk_non_aliased_vuses): Likewise.
* tree-ssa-alias.h (struct ao_ref_s): New structure type.
(ao_ref_init): Declare.
(ao_ref_base): Likewise.
(ao_ref_alias_set): Likewise.
(stmt_may_clobber_ref_p_1): Likewise.
(walk_non_aliased_vuses): Adjust.
* tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): New function.
(get_ref_from_reference_ops): remove.
(vn_reference_lookup_2): Adjust signature.
(vn_reference_lookup_3): Do not re-build trees. Handle unions.
(vn_reference_lookup_pieces): Adjust signature, do not re-build
trees.
(vn_reference_lookup): Adjust.
(vn_reference_insert): Likewise.
(vn_reference_insert_pieces): Adjust signature.
(visit_reference_op_call): Adjust.
* tree-ssa-pre.c (get_expr_type): Simplify.
(phi_translate_1): Adjust.
(compute_avail): Likewise.
(translate_vuse_through_block): Do not re-build trees.
(value_dies_in_block_x): Likewise.
* tree-ssa-sccvn.h (struct vn_reference_s): Add type and alias-set
fields.
(vn_reference_lookup_pieces): Adjust declaration.
(vn_reference_insert_pieces): Likewise.
* gcc.dg/tree-ssa/ssa-fre-26.c: New testcase.
* gcc.c-torture/execute/20090527-1.c: Likewise.
From-SVN: r147953
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20090527-1.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/20090527-1.c b/gcc/testsuite/gcc.c-torture/execute/20090527-1.c new file mode 100644 index 00000000000..d8e3711cdf6 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20090527-1.c @@ -0,0 +1,38 @@ +typedef enum { POSITION_ASIS, POSITION_UNSPECIFIED } unit_position; + +typedef enum { STATUS_UNKNOWN, STATUS_UNSPECIFIED } unit_status; + +typedef struct +{ + unit_position position; + unit_status status; +} unit_flags; + +extern void abort (void); + +void +new_unit (unit_flags * flags) +{ + if (flags->status == STATUS_UNSPECIFIED) + flags->status = STATUS_UNKNOWN; + + if (flags->position == POSITION_UNSPECIFIED) + flags->position = POSITION_ASIS; + + switch (flags->status) + { + case STATUS_UNKNOWN: + break; + + default: + abort (); + } +} + +int main() +{ + unit_flags f; + f.status = STATUS_UNSPECIFIED; + new_unit (&f); + return 0; +} |