[Bug libgomp/92843] [OpenACC] Wrong/missing dynamic reference counting for structured 'REFCOUNT_INFINITY'

2020-04-13 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92843

--- Comment #16 from CVS Commits  ---
The releases/gcc-9 branch has been updated by Thomas Schwinge
:

https://gcc.gnu.org/g:a99a8431e670a6c0ac861d738249ff4d94d6552e

commit r9-8495-ga99a8431e670a6c0ac861d738249ff4d94d6552e
Author: Thomas Schwinge 
Date:   Mon Apr 13 08:56:03 2020 +0200

Rename 'libgomp.oacc-c-c++-common/static-dynamic-lifetimes-*' to
'libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-*' [PR92843]

Fix-up for commit be9862dd96945772ae0692bc95b37ec6dbcabda0 "Test cases for
mixed structured/dynamic data lifetimes with OpenACC [PR92843]": it's
"structured", not "static" data lifetimes/reference counters.

libgomp/
PR libgomp/92843
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-1-lib.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-1-lib.c:
... this.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-1.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-1.c:
... this.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-2-lib.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-2-lib.c:
... this.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-2.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-2.c:
... this.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-3-lib.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-3-lib.c:
... this.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-3.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-3.c:
... this.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-4-lib.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-4-lib.c:
... this.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-4.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-4.c:
... this.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-5-lib.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-5-lib.c:
... this.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-5.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-5.c:
... this.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-6-lib.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-6-lib.c:
... this.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-6.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-6.c:
... this.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-7-lib.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-7-lib.c:
... this.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-7.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-7.c:
... this.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-8-lib.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-8-lib.c:
... this.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-8.c::
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-8.c:
... this.

(cherry picked from commit af4c92573dc462a17a6c345756889d28054ed591)

[Bug libgomp/92843] [OpenACC] Wrong/missing dynamic reference counting for structured 'REFCOUNT_INFINITY'

2020-04-13 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92843

--- Comment #15 from CVS Commits  ---
The master branch has been updated by Thomas Schwinge :

https://gcc.gnu.org/g:af4c92573dc462a17a6c345756889d28054ed591

commit r10-7693-gaf4c92573dc462a17a6c345756889d28054ed591
Author: Thomas Schwinge 
Date:   Mon Apr 13 08:56:03 2020 +0200

Rename 'libgomp.oacc-c-c++-common/static-dynamic-lifetimes-*' to
'libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-*' [PR92843]

Fix-up for commit be9862dd96945772ae0692bc95b37ec6dbcabda0 "Test cases for
mixed structured/dynamic data lifetimes with OpenACC [PR92843]": it's
"structured", not "static" data lifetimes/reference counters.

libgomp/
PR libgomp/92843
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-1-lib.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-1-lib.c:
... this.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-1.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-1.c:
... this.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-2-lib.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-2-lib.c:
... this.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-2.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-2.c:
... this.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-3-lib.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-3-lib.c:
... this.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-3.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-3.c:
... this.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-4-lib.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-4-lib.c:
... this.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-4.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-4.c:
... this.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-5-lib.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-5-lib.c:
... this.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-5.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-5.c:
... this.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-6-lib.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-6-lib.c:
... this.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-6.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-6.c:
... this.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-7-lib.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-7-lib.c:
... this.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-7.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-7.c:
... this.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-8-lib.c:
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-8-lib.c:
... this.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-8.c::
Rename to...
*
testsuite/libgomp.oacc-c-c++-common/structured-dynamic-lifetimes-8.c:
... this.

[Bug libgomp/92843] [OpenACC] Wrong/missing dynamic reference counting for structured 'REFCOUNT_INFINITY'

2020-04-10 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92843

--- Comment #14 from CVS Commits  ---
The releases/gcc-9 branch has been updated by Thomas Schwinge
:

https://gcc.gnu.org/g:3c7a476c5ad3761cb5373f8c59a92e04525c5638

commit r9-8489-g3c7a476c5ad3761cb5373f8c59a92e04525c5638
Author: Julian Brown 
Date:   Fri Jan 17 13:18:18 2020 -0800

Test cases for mixed structured/dynamic data lifetimes with OpenACC
[PR92843]

libgomp/
PR libgomp/92843
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-1-lib.c:
New file.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-1.c:
Likewise.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-2-lib.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-2.c:
Likewise.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-3-lib.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-3.c:
Likewise.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-4-lib.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-4.c:
Likewise.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-5-lib.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-5.c:
Likewise.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-6-lib.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-6.c:
Likewise.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-7-lib.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-7.c:
Likewise.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-8-lib.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-8.c:
Likewise.

(cherry picked from commit be9862dd96945772ae0692bc95b37ec6dbcabda0)

[Bug libgomp/92843] [OpenACC] Wrong/missing dynamic reference counting for structured 'REFCOUNT_INFINITY'

2020-04-10 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92843

--- Comment #13 from CVS Commits  ---
The master branch has been updated by Thomas Schwinge :

https://gcc.gnu.org/g:be9862dd96945772ae0692bc95b37ec6dbcabda0

commit r10-7678-gbe9862dd96945772ae0692bc95b37ec6dbcabda0
Author: Julian Brown 
Date:   Fri Jan 17 13:18:18 2020 -0800

Test cases for mixed structured/dynamic data lifetimes with OpenACC
[PR92843]

libgomp/
PR libgomp/92843
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-1-lib.c:
New file.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-1.c:
Likewise.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-2-lib.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-2.c:
Likewise.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-3-lib.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-3.c:
Likewise.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-4-lib.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-4.c:
Likewise.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-5-lib.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-5.c:
Likewise.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-6-lib.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-6.c:
Likewise.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-7-lib.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-7.c:
Likewise.
*
testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-8-lib.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/static-dynamic-lifetimes-8.c:
Likewise.

[Bug libgomp/92843] [OpenACC] Wrong/missing dynamic reference counting for structured 'REFCOUNT_INFINITY'

2019-12-12 Thread jules at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92843

--- Comment #12 from jules at gcc dot gnu.org ---
For an adaptation of the refcount checking code as alluded to above -- see
PR92848.

[Bug libgomp/92843] [OpenACC] Wrong/missing dynamic reference counting for structured 'REFCOUNT_INFINITY'

2019-12-11 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92843

--- Comment #11 from Thomas Schwinge  ---
Author: tschwinge
Date: Wed Dec 11 16:49:27 2019
New Revision: 279234

URL: https://gcc.gnu.org/viewcvs?rev=279234=gcc=rev
Log:
[PR92843] [OpenACC] Fix dynamic reference counting for structured
'REFCOUNT_INFINITY'

libgomp/
PR libgomp/92843
* oacc-mem.c (present_create_copy, delete_copyout): Fix dynamic
reference counting for structured 'REFCOUNT_INFINITY'.  Add some
assertions.
(goacc_insert_pointer, goacc_remove_pointer): Adjust accordingly.
* testsuite/libgomp.oacc-c-c++-common/pr92843-1.c: New file.
* testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Fix OpenACC.
* testsuite/libgomp.oacc-c-c++-common/lib-82.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/nested-1.c: Likewise.

Added:
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/pr92843-1.c
Modified:
trunk/libgomp/ChangeLog
trunk/libgomp/oacc-mem.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/clauses-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-82.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/nested-1.c

[Bug libgomp/92843] [OpenACC] Wrong/missing dynamic reference counting for structured 'REFCOUNT_INFINITY'

2019-12-11 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92843

Thomas Schwinge  changed:

   What|Removed |Added

   Assignee|jules at gcc dot gnu.org   |tschwinge at gcc dot 
gnu.org
Summary|[OpenACC] Disallow  |[OpenACC] Wrong/missing
   |'acc_delete' etc. for   |dynamic reference counting
   |everything without a|for structured
   |dynamic reference count |'REFCOUNT_INFINITY'

--- Comment #10 from Thomas Schwinge  ---
(In reply to myself from comment #1)
> I had assumed [...]
> But, I'm not sure now, after thinking through the following.  ;-\
> 
> Because: per my reading, it actually is permissible to call
> 'acc_delete'/etc. (dynamic reference counter; "present decrement" action)
> inside '#pragma acc data' (structured reference counter).  This "decrements
> the [...] dynamic reference counter for 'var', if its value is greater than
> zero. If the reference counter is already zero, its value is left
> unchanged".  The latter applies here.  "If both reference counters are then
> zero, a delete action is performed."  The structured reference counter is
> left untouched by 'acc_delete', so the data remains mapped; 'acc_delete'
> actually is a no-op?
> 
> #define N 23
>   float h[N];
> 
> #pragma acc data create(h)
>   {
> acc_delete(, 92); // no-op
> // 'h' remains mapped!
>   }

I read OpenACC 2.6 again, and convince myself that indeed this seems to be the
expected behavior, thus adjusting this PR Summary, and testing adjusted patch.