mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-05 09:44:10 +08:00
libgomp: Additional acc_shutdown bug fixing and testing
libgomp/ * oacc-init.c (acc_shutdown): Call gomp_init_targets_once. * testsuite/libgomp.oacc-c-c++-common/lib-8.c: New file. From-SVN: r229380
This commit is contained in:
parent
7c8f138de6
commit
aa8b7d3051
@ -1,5 +1,8 @@
|
||||
2015-10-26 Thomas Schwinge <thomas@codesourcery.com>
|
||||
|
||||
* oacc-init.c (acc_shutdown): Call gomp_init_targets_once.
|
||||
* testsuite/libgomp.oacc-c-c++-common/lib-8.c: New file.
|
||||
|
||||
PR libgomp/66518
|
||||
* testsuite/libgomp.oacc-c-c++-common/lib-3.c: Resolve XFAIL.
|
||||
|
||||
|
@ -449,6 +449,8 @@ ialias (acc_init)
|
||||
void
|
||||
acc_shutdown (acc_device_t d)
|
||||
{
|
||||
gomp_init_targets_once ();
|
||||
|
||||
gomp_mutex_lock (&acc_device_lock);
|
||||
|
||||
acc_shutdown_1 (d);
|
||||
|
19
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-8.c
Normal file
19
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-8.c
Normal file
@ -0,0 +1,19 @@
|
||||
/* Expect error message when shutting down a device that has never been
|
||||
initialized. */
|
||||
/* { dg-do run } */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <openacc.h>
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
fprintf (stderr, "CheCKpOInT\n");
|
||||
acc_shutdown (acc_device_default);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* { dg-output "CheCKpOInT(\n|\r\n|\r).*" } */
|
||||
/* { dg-output "no device initialized" } */
|
||||
/* { dg-shouldfail "" } */
|
Loading…
Reference in New Issue
Block a user