This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix fortran libgomp failures


Richard Guenther wrote:
>> On Nov 27, 2007 10:32 AM, Jakub Jelinek <jakub@redhat.com> wrote:
>>
>> Regtested on x86_64-linux, ok for trunk?
>
> Fine with me, even if I think the trans-expr.c part is unneeded.

It is also fine with me from the Fortran side (w/ and w/o the
trans-expr.c part).

Tobias

>> 2007-11-27  Jakub Jelinek  <jakub@redhat.com>
>>
>>         * trans-expr.c (gfc_trans_string_copy): Convert both dest and
>>         src to void *.
>>
>>         * trans-openmp.c (gfc_omp_privatize_by_reference): For REFERENCE_TYPE
>>         pass by reference only PARM_DECLs or non-artificial decls.
>>
>> --- gcc/fortran/trans-expr.c.jj 2007-11-26 11:02:23.000000000 +0100
>> +++ gcc/fortran/trans-expr.c    2007-11-27 09:04:31.000000000 +0100
>> @@ -2708,7 +2708,10 @@ gfc_trans_string_copy (stmtblock_t * blo
>>
>>       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],
>> --- gcc/fortran/trans-openmp.c.jj       2007-08-27 10:15:33.000000000 +0200
>> +++ gcc/fortran/trans-openmp.c  2007-11-27 09:39:40.000000000 +0100
>> @@ -44,7 +44,8 @@ gfc_omp_privatize_by_reference (const_tr
>>  {
>>    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)
>>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]