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]

libgomp failure (was: Re: [FORTRAN mainline] dereference POINTER_PLUS_EXPR check)


Aldy Hernandez wrote:
>> It should use the type of DEST, all pointers are trivially convertible
>> to void *,
>> which is the formal argument of memset (in the ChangeLog you have memmove).
>>
>> Not that it makes a big difference here (in the end we try to be type-exact in
>> one expression tree, but as the expression result type will vanish with tuples,
>> there won't a difference for both cases).
>>     
> Fixed below.
>   
This patch seems to cause a lot of libgomp regressions.
See: http://gcc.gnu.org/ml/fortran/2007-11/msg00209.html

For libgomp.fortran/character1.f90 with "gfortran -fopenmp":

libgomp.fortran/character1.f90: In function 'test':
libgomp.fortran/character1.f90:39: internal compiler error: in
omp_add_variable, at gimplify.c:4677

(without "-fopenmp" there is no failure)


If I revert the following patch, the ICE is gone.


r130371 | aldyh | 2007-11-23 11:50:45 +0100 (Fri, 23 Nov 2007) | 2 lines

+       * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
+       memset.
> 	* trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
> 	memset.
>  
> --- trans-expr.c	(revision 130355)
> +++ trans-expr.c	(local)
> @@ -2701,7 +2701,7 @@ gfc_trans_string_copy (stmtblock_t * blo
>    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, 
>
>   


Tobias


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