Re: [Patch, Fortran] PR63861 - fix OpenMP/ACC's gfc_has_alloc_comps

2015-01-27 Thread Jakub Jelinek
On Tue, Jan 27, 2015 at 08:27:07AM +0100, Tobias Burnus wrote: > 2015-01-27 Tobias Burnus > > PR fortran/63861 > gcc/fortran/ > * trans-openmp.c (gfc_has_alloc_comps, gfc_trans_omp_clauses): > Fix handling for scalar coarrays. > * trans-types.c (gfc_get_element_type): Ad

Re: [Patch, Fortran] PR63861 - fix OpenMP/ACC's gfc_has_alloc_comps

2015-01-26 Thread Tobias Burnus
Updated patch below. Jakub Jelinek wrote: On Mon, Jan 26, 2015 at 01:14:39PM +0100, Tobias Burnus wrote: The question is why I didn't see the nonsense in the test suite. It doesn't seem to be tested for in gcc/testsuite/gfortran.dg/; it might be tested in libgomp/testsuite/ - I don't recall whe

Re: [Patch, Fortran] PR63861 - fix OpenMP/ACC's gfc_has_alloc_comps

2015-01-26 Thread Jakub Jelinek
On Mon, Jan 26, 2015 at 01:14:39PM +0100, Tobias Burnus wrote: > The question is why I didn't see the nonsense in the test suite. It > doesn't seem to be tested for in gcc/testsuite/gfortran.dg/; it might be > tested in libgomp/testsuite/ - I don't recall whether I retested after > the (incomplete)

Re: [Patch, Fortran] PR63861 - fix OpenMP/ACC's gfc_has_alloc_comps

2015-01-26 Thread Tobias Burnus
Dear all, I wrote: > - while (GFC_DESCRIPTOR_TYPE_P (type) || GFC_ARRAY_TYPE_P (type)) > + if (GFC_DESCRIPTOR_TYPE_P (type) > + || (GFC_ARRAY_TYPE_P (type) && GFC_TYPE_ARRAY_RANK (type) == 0)) That's nonsense: It should be "!= 0". If one has an array type which has a rank > 0 (i.e. it is n

Re: [Patch, Fortran] PR63861 - fix OpenMP/ACC's gfc_has_alloc_comps

2015-01-25 Thread Jakub Jelinek
On Sat, Jan 24, 2015 at 07:21:27PM +0100, Tobias Burnus wrote: > gfortran's scalar coarray are special: The descriptorless variant is a > normal variable with some language-specific additional information (corank, > bounds). The descriptor variant has a descriptor but the _data component is > just

[Patch, Fortran] PR63861 - fix OpenMP/ACC's gfc_has_alloc_comps

2015-01-24 Thread Tobias Burnus
gfortran's scalar coarray are special: The descriptorless variant is a normal variable with some language-specific additional information (corank, bounds). The descriptor variant has a descriptor but the _data component is just a pointer to the scalar variable. As the element type of a descrip