aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gupc/get-di-strict.upc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/gupc/get-di-strict.upc')
-rw-r--r--gcc/testsuite/gcc.dg/gupc/get-di-strict.upc19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gupc/get-di-strict.upc b/gcc/testsuite/gcc.dg/gupc/get-di-strict.upc
new file mode 100644
index 00000000000..20c89d32d5e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gupc/get-di-strict.upc
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-original" } */
+
+/* The base address of the UPC shared section */
+extern char __upc_shared_start[1];
+
+typedef unsigned int uint_di_t __attribute__ ((__mode__(__DI__)));
+
+/* UPC runtime remote access prototype */
+extern uint_di_t __getsdi2 (upc_shared_ptr_t);
+
+strict shared uint_di_t x;
+
+uint_di_t p () {
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times "getsdi2" 1 "original" } } */
+/* { dg-final { scan-tree-dump-times "get|put" 1 "original" } } */