Hi! On Wed, 22 Jul 2015 16:37:46 +0200, I wrote: > [...] found an inconsistency in libgomp; committed > to gomp-4_0-branch in r226071: [...]
OK for trunk? commit dc0c73e9ac5decf5b36be25497ed5f4b99136fba Author: Thomas Schwinge <tho...@codesourcery.com> Date: Fri Oct 9 13:22:52 2015 +0200 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. --- libgomp/oacc-init.c | 2 ++ libgomp/testsuite/libgomp.oacc-c-c++-common/lib-8.c | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git libgomp/oacc-init.c libgomp/oacc-init.c index a0e62a4..9a9a0b0 100644 --- libgomp/oacc-init.c +++ libgomp/oacc-init.c @@ -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); diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/lib-8.c libgomp/testsuite/libgomp.oacc-c-c++-common/lib-8.c new file mode 100644 index 0000000..ea28b6b --- /dev/null +++ libgomp/testsuite/libgomp.oacc-c-c++-common/lib-8.c @@ -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 "" } */ Grüße, Thomas
signature.asc
Description: PGP signature