diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2011-06-28 21:50:06 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2011-06-28 21:50:06 +0000 |
commit | 4a9206ce4a426add4b27afebb24a6e8fa0e392bd (patch) | |
tree | 17e20fbbba5886cc04e4327c1d37aca5f8a4d67e | |
parent | dac9ad16eae71bd1ca65845555f56f5cf46caadf (diff) | |
download | gcc-4a9206ce4a426add4b27afebb24a6e8fa0e392bd.zip gcc-4a9206ce4a426add4b27afebb24a6e8fa0e392bd.tar.gz gcc-4a9206ce4a426add4b27afebb24a6e8fa0e392bd.tar.bz2 |
* tree-ssa-dom.c (initialize_hash_element): Fix oversight.
From-SVN: r175600
-rw-r--r-- | gcc/ChangeLog | 19 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/opt17.adb | 13 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/opt17.ads | 7 | ||||
-rw-r--r-- | gcc/tree-ssa-dom.c | 1 |
5 files changed, 37 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 00991f7..588a0b5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2011-06-28 Eric Botcazou <ebotcazou@adacore.com> + + * tree-ssa-dom.c (initialize_hash_element): Fix oversight. + 2011-06-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * config/sparc/sol2-64.h (TARGET_DEFAULT): Remove. @@ -122,8 +126,8 @@ 2011-06-27 Jan Hubicka <jh@suse.cz> - * ipa.c (cgraph_address_taken_from_non_vtable_p): Walk references of node - instead of references in node. + * ipa.c (cgraph_address_taken_from_non_vtable_p): Walk references of + node instead of references in node. 2011-06-27 Richard Henderson <rth@redhat.com> @@ -359,13 +363,14 @@ PR tree-optimize/49373 * tree-pass.h (all_late_ipa_passes): Declare. * cgraphunit.c (init_lowered_empty_function): Fix properties. - (cgraph_optimize): Execute late passes; remove unreachable funcions after - materialization. - * ipa-inline.c (gate_ipa_inline): Enable only when optimizing or LTOing. + (cgraph_optimize): Execute late passes; remove unreachable funcions + after materialization. + * ipa-inline.c (gate_ipa_inline): Enable only when optimizing or + LTOing. * passes.c (all_late_ipa_passes): Declare. (dump_passes, register_pass): Handle late ipa passes. - (init_optimization_passes): Move ipa_pta to late passes; schedule fixup_cfg - at beggining of all_passes. + (init_optimization_passes): Move ipa_pta to late passes; schedule + fixup_cfg at beggining of all_passes. (apply_ipa_transforms): New function. (execute_one_pass): When doing simple ipa pass, apply all transforms. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3139eba..46419f3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-06-28 Eric Botcazou <ebotcazou@adacore.com> + + * gnat.dg/opt17.ad[sb]: New test. + 2011-06-28 Janis Johnson <janisjo@codesourcery.com> Tom de Vries <tom@codesourcery.com> diff --git a/gcc/testsuite/gnat.dg/opt17.adb b/gcc/testsuite/gnat.dg/opt17.adb new file mode 100644 index 0000000..361f760 --- /dev/null +++ b/gcc/testsuite/gnat.dg/opt17.adb @@ -0,0 +1,13 @@ +-- { dg-do compile } +-- { dg-options "-O" } + +package body Opt17 is + + function Func return S is + V : String (1 .. 6); + begin + V (1 .. 3) := "ABC"; + return V (1 .. 5); + end; + +end Opt17; diff --git a/gcc/testsuite/gnat.dg/opt17.ads b/gcc/testsuite/gnat.dg/opt17.ads new file mode 100644 index 0000000..601c2f2 --- /dev/null +++ b/gcc/testsuite/gnat.dg/opt17.ads @@ -0,0 +1,7 @@ +package Opt17 is + + subtype S is String (1 .. 5); + + function Func return S; + +end Opt17; diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index f41d7ec..bbfe0bc 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -214,6 +214,7 @@ initialize_hash_element (gimple stmt, tree lhs, { case GIMPLE_SINGLE_RHS: expr->kind = EXPR_SINGLE; + expr->type = TREE_TYPE (gimple_assign_lhs (stmt)); expr->ops.single.rhs = gimple_assign_rhs1 (stmt); break; case GIMPLE_UNARY_RHS: |