This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [OpenACC] declare directive


Hi!

On Wed, 11 Nov 2015 09:32:33 +0100, Jakub Jelinek <jakub@redhat.com> wrote:
> On Mon, Nov 09, 2015 at 05:11:44PM -0600, James Norris wrote:
> > diff --git a/gcc/c-family/c-pragma.h b/gcc/c-family/c-pragma.h
> > index 953c4e3..c6a2981 100644
> > --- a/gcc/c-family/c-pragma.h
> > +++ b/gcc/c-family/c-pragma.h
> > @@ -30,6 +30,7 @@ enum pragma_kind {
> >    PRAGMA_OACC_ATOMIC,
> >    PRAGMA_OACC_CACHE,
> >    PRAGMA_OACC_DATA,
> > +  PRAGMA_OACC_DECLARE,
> >    PRAGMA_OACC_ENTER_DATA,
> >    PRAGMA_OACC_EXIT_DATA,
> >    PRAGMA_OACC_KERNELS,
> 
> This change will make PR68271 even worse, so would be really nice to
> get that fixed first.

"Would be really nice" means that you're asking us to work on and resolve
PR68271 before installing this patch?


> > +	  case GOMP_MAP_FORCE_PRESENT:
> > +	    if (!acc_is_present (hostaddrs[i], sizes[i]))
> > +	      gomp_fatal ("[%p,%zd] is not mapped", hostaddrs[i], sizes[i]);
> 
> This isn't portable unfortunately to all targets that build libgomp.
> Looking around, we use various ways to print sizes in gomp_fatal: [...]
> [...] if you or one of your collegues could
> clean all this up, it would be greatly appreciated.  [...]

ACK; will put it on the list of things to do, later on.


> > +int
> > +main (int argc, char **argv)
> > +{
> > +  int a[8] __attribute__((unused));
> > +
> > +  __builtin_printf ("CheCKpOInT\n");
> > +#pragma acc declare present (a)
> > +}
> > +
> > +/* { dg-output "CheCKpOInT" } */
> > +/* { dg-shouldfail "" } */
> 
> Are you sure printf will have the buffers flushed before abort on all
> targets?

No, have to print to stderr; see
<http://news.gmane.org/find-root.php?message_id=%3C87pp017fwh.fsf%40kepler.schwinge.homeip.net%3E>.


GrÃÃe
 Thomas

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]