+2015-04-30 James Norris <jnorris@codesourcery.com>
+
+ PR testsuite/65205
+ * testsuite/lib/libgomp.exp
+ (check_effective_target_openacc_host_selected)
+ (check_effective_target_openacc_host_nonshm_selected): New
+ procedures.
+ * testsuite/libgomp.oacc-c-c++-common/clauses-2.c: Fix misuse of
+ dg-shouldfail.
+ * testsuite/libgomp.oacc-c-c++-common/lib-1.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-11.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-4.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-62.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-71.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise.
+ * testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise.
+
2015-04-08 Julian Brown <julian@codesourcery.com>
* libgomp.h (target_mem_desc: Remove mem_map field.
}
return 0;
}
+
+# Return 1 if the host target is selected for offloaded
+
+proc check_effective_target_openacc_host_selected { } {
+ global offload_target_openacc
+ if { $offload_target_openacc == "host" } {
+ return 1;
+ }
+ return 0;
+}
+
+# Return 1 if the host_nonshm target is selected for offloaded
+
+proc check_effective_target_openacc_host_nonshm_selected { } {
+ global offload_target_openacc
+ if { $offload_target_openacc == "host_nonshm" } {
+ return 1;
+ }
+ return 0;
+}
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,\d+\] is not mapped" } */
+/* { dg-output "Trying to map into device \\\[0x\[0-9a-f\]+..0x\[0-9a-f\]+\\\) object when \\\[0x\[0-9a-f\]+..0x\[0-9a-f\]+\\\) is already mapped" }
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: device already active" } */
+/* { dg-output "device already active" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: mem free failed 1" } */
+/* { dg-output "invalid device address" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,\+256\] already mapped to \[\h+,\+256\]" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,\\\+256\\\] already mapped to \\\[0x\[0-9a-f\]+,\\\+256\\\]" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,256\] is not mapped" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,256\\\] is not mapped" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,256\] is not mapped" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,256\\\] is not mapped" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: no device initialized" } */
+/* { dg-output "no device initialized" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,256\] surounds2 \[\h+,\+257\]" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,256\\\] surrounds2 \\\[0x\[0-9a-f\]+,\\\+257\\\]" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,0\] is not mapped" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,0\\\] is not mapped" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,256\] surrounds2 \[\h+,\+255\]" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,256\\\] surrounds2 \\\[0x\[0-9a-f\]+,\\\+255\\\]" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,256\] surrounds2 \[\h+,\+512\]" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,256\\\] surrounds2 \\\[0x\[0-9a-f\]+,\\\+512\\\]" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,256\] already mapped to \[\h+,256\]" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,\\\+256\\\] already mapped to \\\[0x\[0-9a-f\]+,\\\+256\\\]" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,\+0\] is a bad range" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,\\\+0\\\] is a bad range" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\(nil\)\] is a bad range" } */
+/* { dg-output "\\\[\\\(nil\\\),\\\+256\\\] is a bad range" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\(nil\),256\] is not mapped" } */
+/* { dg-output "\\\[\\\(nil\\\),256\\\] is not mapped" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,0\] is not mapped" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,0\\\] is not mapped" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: device 4(4) is initialized" } */
+/* { dg-output "device \[0-9\]+\\\(\[0-9\]+\\\) is initialized" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,256\] surrounds2 \[\h+,\+254\]" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,256\\\] surrounds2 \\\[0x\[0-9a-f\]+,\\\+254\\\]" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,\+256\] not mapped" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,\\\+256\\\] not mapped" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\(nil\),+256\] is a bad range" } */
+/* { dg-output "\\\[\\\(nil\\\),\\\+256\\\] is a bad range" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,\+0\] is a bad range" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,\\\+0\\\] is a bad range" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\(nil\),+256\] is a bad range" } */
+/* { dg-output "\\\[\\\(nil\\\),\\\+256\\\] is a bad range" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: device 99 is out of range" } */
+/* { dg-output "device \[0-9\]+ out of range" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,\+0\] is a bad range" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,\\\+0\\\] is a bad range" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,256\] is not mapped" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,256\\\] is not mapped" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\(nil\),256\] is not mapped" } */
+/* { dg-output "\\\[\\\(nil\\\),256\\\] is not mapped" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,0\] is not mapped" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,0\\\] is not mapped" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\(nil\),256\] is not mapped" } */
+/* { dg-output "\\\[\\\(nil\\\),256\\\] is not mapped" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,0\] is not mapped" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,0\\\] is not mapped" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[(nil),+256\]->\[\h+,\+256\] is a bad map" } */
+/* { dg-output "\\\[\\\(nil\\\),\\\+256\]->\[0x\[0-9a-f\]+,\\\+256\\\] is a bad map" { target openacc_nvidia_accel_selected } } */
+/* { dg-output "cannot map data on shared-memory system" { target openacc_host_selected } } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,\+256\]->\[(nil),\+256\] is a bad map" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,\\\+256\]->\\\[\\\(nil\\\),\\\+256\\\] is a bad map" { target openacc_nvidia_accel_selected } } */
+/* { dg-output "cannot map data on shared-memory system" { target openacc_host_selected } } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \[\h+,\+0\]->\[\h+,\+0\] is a bad map" } */
+/* { dg-output "\\\[0x\[0-9a-f\]+,\\\+0\\\]->\\\[0x\[0-9a-f\]+,\\\+0\\\] is a bad map" { target openacc_nvidia_accel_selected } } */
+/* { dg-output "cannot map data on shared-memory system" { target openacc_host_selected } } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \h+ is not a mapped block" } */
+/* { dg-output "0x\[0-9a-f\]+ is not a mapped block" { target openacc_nvidia_accel_selected } } */
+/* { dg-output "cannot map data on shared-memory system" { target openacc_host_selected } } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: \(nil\) is not a mapped block" } */
+/* { dg-output "\\\(nil\\\) is not a mapped block" { target openacc_nvidia_accel_selected } } */
+/* { dg-output "cannot map data on shared-memory system" { target openacc_host_selected } } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: invalid size" } */
+/* { dg-output "invalid size" } */
+/* { dg-shouldfail "" } */
-/* { dg-do run } */
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
#include <string.h>
#include <stdlib.h>
return 0;
}
-/* { dg-shouldfail "libgomp: invalid device address" } */
+/* { dg-output "invalid device address" } */
+/* { dg-shouldfail "" } */
-/* { dg-do run } */
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
#include <string.h>
#include <stdlib.h>
return 0;
}
-/* { dg-shouldfail "libgomp: invalid host address" } */
+/* { dg-output "invalid host address" } */
+/* { dg-shouldfail "" } */
-/* { dg-do run } */
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
#include <string.h>
#include <stdlib.h>
return 0;
}
-/* { dg-shouldfail "libgomp: invalid host or device address" } */
+/* { dg-output "invalid host or device address" } */
+/* { dg-shouldfail "" } */
-/* { dg-do run } */
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
#include <string.h>
#include <stdlib.h>
return 0;
}
-/* { dg-shouldfail "libgomp: invalid host address" } */
+/* { dg-output "invalid host address" } */
+/* { dg-shouldfail "" } */
-/* { dg-do run } */
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
#include <string.h>
#include <stdlib.h>
return 0;
}
-/* { dg-shouldfail "libgomp: invalid device address" } */
+/* { dg-output "invalid device address" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: unknown async \d" } */
+/* { dg-output "unknown async \[0-9\]+" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: unknown async \d" } */
+/* { dg-output "unknown async \[0-9\]+" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: identical parameters" } */
+/* { dg-output "identical parameters" } */
+/* { dg-shouldfail "" } */
return 0;
}
-/* { dg-shouldfail "libgomp: present clause: !acc_is_present" } */
+/* { dg-output "present clause: !acc_is_present" } */
+/* { dg-shouldfail "" } */