This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH] Fix PR78027
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: Jeff Law <law at redhat dot com>
- Cc: Cesar Philippidis <cesar at codesourcery dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>, mliska at suse dot cz, Jakub Jelinek <jakub at redhat dot com>, Fortran List <fortran at gcc dot gnu dot org>
- Date: Fri, 9 Dec 2016 17:56:54 +0300 (MSK)
- Subject: Re: [PATCH] Fix PR78027
- Authentication-results: sourceware.org; auth=none
- References: <bdd55ec0-ba12-4413-e79d-1b051533ea1b@codesourcery.com> <22bd95fe-0a89-fbd6-7a1c-e9049c0ab3fc@redhat.com>
On Thu, 8 Dec 2016, Jeff Law wrote:
> > PR fortran/78027
> >
> > gcc/
> > * ipa-icf.c (sem_function::parse): Don't process functions with
> > oacc decl attributes, as they may be OpenACC routines.
> >
> > gcc/testsuite/
> > * c-c++-common/goacc/acc-icf.c: New test.
> > * gfortran.dg/goacc/pr78027.f90: New test.
> This follows the same approach as we do for openmp. This is fine for the
> trunk.
Normally all offloaded code has either "omp declare target" (most functions) or
"omp target entrypoint" (only toplevel offloaded code). This used to include
OpenACC functions: they would have "oacc fnattrib" _in_ _addition_ to those
attributes, not _instead_ of them! If something related to a recent OpenACC
patch adds "oacc fnattrib" without at the same time adding "omp declare target",
it's probable that other places in the compiler may break, not just IPA ICF.
The explanation and the patch are written as if "oacc fnattrib" can appear
without "omp declare target" -- ttbomk this could never happen before.
Can this please be cleared up?
Alexander
P.S. (and for the record, I'm unhappy that the reason for blacklisting "omp *"
attributes doesn't seem to be documented anywhere -- I see no way to understand
from looking at this code _why_ the check is there; is it due to issues with
"omp declare simd"? or something else?)