public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Cesar Philippidis <cesar@codesourcery.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	Fortran List	<fortran@gcc.gnu.org>
Subject: Re: [patch] Fortran fix for PR70289
Date: Fri, 01 Apr 2016 15:07:00 -0000	[thread overview]
Message-ID: <56FE8EAC.3070402@codesourcery.com> (raw)
In-Reply-To: <20160401145600.GX3017@tucnak.redhat.com>

On 04/01/2016 07:56 AM, Jakub Jelinek wrote:
> On Fri, Apr 01, 2016 at 07:49:16AM -0700, Cesar Philippidis wrote:
>> The bug in PR70289 is an assertion failure triggered by a static
>> variable used inside an offloaded acc region which doesn't have a data
>> clause associated with it. Basically, that static variable ends up in a
>> different lto partition, which was not streamed to the offloaded
>> compiler. I'm not sure if we should try to replicate the static storage
>> in the offloaded regions, but it probably doesn't make sense in a
>> parallel environment anyway.
> 
> Is this really Fortran specific?  I'd expect the diagnostics to be in
> gimplify.c and handle it for all 3 FEs...

By the time the variable reaches the gimplifier, the reduction variable
may no longer match the ones inside the data clause. E.g. consider this
directive inside a fortran subroutine:

  !$acc parallel copyout(temp) reduction(+:temp)

The gimplifier would see something like:

  map(force_from:*temp.2 [len: 4]) map(alloc:temp [pointer assign, bias:
0]) reduction(+:temp)

At this point, unless I'm mistaken, it would be difficult to tell if
temp.2 is a pointer to the same temp in the reduction. Maybe I'm missing
something?

Cesar

  reply	other threads:[~2016-04-01 15:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 14:49 Cesar Philippidis
2016-04-01 14:56 ` Jakub Jelinek
2016-04-01 15:07   ` Cesar Philippidis [this message]
2016-04-01 15:17     ` Jakub Jelinek
2016-04-04 21:35       ` Cesar Philippidis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56FE8EAC.3070402@codesourcery.com \
    --to=cesar@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).