aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gupc/get-blk-strict.upc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/gupc/get-blk-strict.upc')
-rw-r--r--gcc/testsuite/gcc.dg/gupc/get-blk-strict.upc21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gupc/get-blk-strict.upc b/gcc/testsuite/gcc.dg/gupc/get-blk-strict.upc
new file mode 100644
index 00000000000..6e5ada2adba
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gupc/get-blk-strict.upc
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-original" } */
+
+/* The base address of the UPC shared section */
+extern char __upc_shared_start[1];
+
+typedef struct { unsigned char c[16]; } blk_t;
+
+/* UPC runtime remote access prototype */
+typedef __SIZE_TYPE__ size_t;
+extern blk_t __getsblk3 (void *, upc_shared_ptr_t, size_t);
+
+strict shared blk_t x;
+blk_t local_x;
+
+void p () {
+ local_x = x;
+}
+
+/* { dg-final { scan-tree-dump-times "getsblk3" 1 "original" } } */
+/* { dg-final { scan-tree-dump-times "get|put" 1 "original" } } */