This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, Fortran] PR63861 - fix OpenMP/ACC's gfc_has_alloc_comps
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org, Cesar Philippidis <cesar at codesourcery dot com>
- Date: Mon, 26 Jan 2015 13:36:23 +0100
- Subject: Re: [Patch, Fortran] PR63861 - fix OpenMP/ACC's gfc_has_alloc_comps
- Authentication-results: sourceware.org; auth=none
- References: <20150126121439 dot GB19591 at physik dot fu-berlin dot de>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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) change back from "if" to "while" + (wrong) rank check.
>
>
> Jakub: It should show up in a test in libgomp/testsuite/, shouldn't it?
That surprises me too, I thought the coverage of that was sufficient.
> Jakub: Do you know why you used a WHILE and not a simple IF? I tried
> to come up with a case where the element type is an array, but I failed.
Most likely just because e.g. for C/C++ I'd also recurse on ARRAY_TYPEs
until I find the ultimate element. Thus didn't think if it is possible to
have descriptor or descriptor-less arrays inside of arrays.
>
> All: Any preference for "if" or "while" + rank != 0?
If it works, fine. But perhaps put there some comment on why
for rank == 0 arrays get_element_type is undesirable.
Jakub