* trans-expr.c (gfc_trans_string_copy): Convert both dest and
src to void *.
PR fortran/34247
* trans-openmp.c (gfc_omp_privatize_by_reference): For REFERENCE_TYPE
pass by reference only PARM_DECLs or non-artificial decls.
From-SVN: r130492
+2007-11-28 Jakub Jelinek <jakub@redhat.com>
+
+ * trans-expr.c (gfc_trans_string_copy): Convert both dest and
+ src to void *.
+
+ PR fortran/34247
+ * trans-openmp.c (gfc_omp_privatize_by_reference): For REFERENCE_TYPE
+ pass by reference only PARM_DECLs or non-artificial decls.
+
2007-11-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/32928
We're now doing it here for better optimization, but the logic
is the same. */
-
+
+ dest = fold_convert (pvoid_type_node, dest);
+ src = fold_convert (pvoid_type_node, src);
+
/* Truncate string if source is too long. */
cond2 = fold_build2 (GE_EXPR, boolean_type_node, slen, dlen);
tmp2 = build_call_expr (built_in_decls[BUILT_IN_MEMMOVE],
{
tree type = TREE_TYPE (decl);
- if (TREE_CODE (type) == REFERENCE_TYPE)
+ if (TREE_CODE (type) == REFERENCE_TYPE
+ && (!DECL_ARTIFICIAL (decl) || TREE_CODE (decl) == PARM_DECL))
return true;
if (TREE_CODE (type) == POINTER_TYPE)