diff options
author | Tristan Gingold <gingold@adacore.com> | 2012-05-15 09:31:45 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@gcc.gnu.org> | 2012-05-15 09:31:45 +0000 |
commit | 33960e2e8ad75ac54052c24ce8ba8dbd447ef300 (patch) | |
tree | 412a1ae05c2b1796ef59f0e40d5329dfd603ae70 | |
parent | e7834f95b1c3d9a869ed127219ee8e3fd3e219f3 (diff) | |
download | gcc-33960e2e8ad75ac54052c24ce8ba8dbd447ef300.zip gcc-33960e2e8ad75ac54052c24ce8ba8dbd447ef300.tar.gz gcc-33960e2e8ad75ac54052c24ce8ba8dbd447ef300.tar.bz2 |
tree-ssa-strlen.c (get_string_length): Convert lhs if needed.
2012-05-15 Tristan Gingold <gingold@adacore.com>
* tree-ssa-strlen.c (get_string_length): Convert lhs if needed.
From-SVN: r187507
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-ssa-strlen.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ba4cd85..da1587e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2012-05-15 Tristan Gingold <gingold@adacore.com> + + * tree-ssa-strlen.c (get_string_length): Convert lhs if needed. + 2012-05-15 Richard Guenther <rguenther@suse.de> * gimple.c (gimple_set_modified): Move ... @@ -26,7 +30,7 @@ * doc/md.texi (fma): Define to only be applicable for single rounding. - + 2012-05-14 Uros Bizjak <ubizjak@gmail.com> PR target/46098 diff --git a/gcc/tree-ssa-strlen.c b/gcc/tree-ssa-strlen.c index a37633a..05fd10d 100644 --- a/gcc/tree-ssa-strlen.c +++ b/gcc/tree-ssa-strlen.c @@ -427,6 +427,12 @@ get_string_length (strinfo si) NULL); add_referenced_var (lhs_var); tem = gimple_call_arg (stmt, 0); + if (!ptrofftype_p (TREE_TYPE (lhs))) + { + lhs = convert_to_ptrofftype (lhs); + lhs = force_gimple_operand_gsi (&gsi, lhs, true, NULL_TREE, + true, GSI_SAME_STMT); + } lenstmt = gimple_build_assign_with_ops (POINTER_PLUS_EXPR, make_ssa_name (lhs_var, NULL), |