libgomp failure (was: Re: [FORTRAN mainline] dereference POINTER_PLUS_EXPR check)
Richard Guenther
richard.guenther@gmail.com
Sun Nov 25 19:18:00 GMT 2007
On Nov 25, 2007 4:04 PM, Aldy Hernandez <aldyh@redhat.com> wrote:
> Hi folks. Hi Jakub.
>
> I've found what the cause of the problem reported below, but I am unsure
> as to how to fix it. Perhaps Jakub can shed some light.
>
> With the patch below, the type of the P_P_E is now:
>
> type <reference_type 0x2aaaaab90240
> type <array_type 0x2aaaaab90180 type ...
>
> gfc_omp_privatize_by_reference is now being called with a temporary of
> the above type. This function returns TRUE for any REFERENCE_TYPE.
> Without the patch, it obviously returned pchar_type_node which returned
> false.
>
> My naive solution is to use PTR_TYPE_NODE instead of TREE_TYPE(dest) in
> my original patch, but Richard G had commented that we should ideally be
> type-exact in the expression tree. Do folks care if I make this
> PTR_TYPE_NODE, or is a fix in gfc_omp_privatize_by_reference in order?
Uh, that it handles REFERENCE_TYPEs as special (to get value semantics
here I guess) and you now trip over this looks like there is a lantent bug
either to use a REFERENCE_TYPE for the array in the first place or that it
not properly privatizes arrays that are passed by value.
So I think this needs further investigation anyway. But yes, Jakub maybe knows
about the history of this function.
Richard.
More information about the Fortran
mailing list