mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-23 05:09:09 +08:00
re PR fortran/34247 (ICE in omp_add_variable, at gimplify.c:4677)
* 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
This commit is contained in:
parent
1661473b7f
commit
36cefd3922
@ -1,3 +1,12 @@
|
||||
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
|
||||
|
@ -2708,7 +2708,10 @@ gfc_trans_string_copy (stmtblock_t * block, tree dlength, tree dest,
|
||||
|
||||
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],
|
||||
|
@ -44,7 +44,8 @@ gfc_omp_privatize_by_reference (const_tree decl)
|
||||
{
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user