+ * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
authorAldy Hernandez <aldyh@redhat.com>
Fri, 23 Nov 2007 10:50:45 +0000 (10:50 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Fri, 23 Nov 2007 10:50:45 +0000 (10:50 +0000)
+       memset.

From-SVN: r130371

gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c

index 3939e0b58d78fba962db14f284eb140f5f4350b4..85f2a5a38939ca328e5f48f9470414d7f911724f 100644 (file)
@@ -1,3 +1,8 @@
+2007-11-23  Aldy Hernandez  <aldyh@redhat.com>
+
+       * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
+       memset.
+               
 2007-11-22  Tobias Burnus  <burnus@net-b.de>
 
        * primary.c (gfc_match_structure_constructor): Allow
index 6fc1e2c13163c9c014dc42309fb9a18e9f100b90..c47f69b8b38ace50a84595c575b3d65578a9cadf 100644 (file)
@@ -2701,7 +2701,7 @@ gfc_trans_string_copy (stmtblock_t * block, tree dlength, tree dest,
   tmp3 = build_call_expr (built_in_decls[BUILT_IN_MEMMOVE],
                          3, dest, src, slen);
 
-  tmp4 = fold_build2 (POINTER_PLUS_EXPR, pchar_type_node, dest,
+  tmp4 = fold_build2 (POINTER_PLUS_EXPR, TREE_TYPE (dest), dest,
                      fold_convert (sizetype, slen));
   tmp4 = build_call_expr (built_in_decls[BUILT_IN_MEMSET], 3,
                          tmp4,