aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gupc/passing-arg-makes-pts-from-int.upc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/gupc/passing-arg-makes-pts-from-int.upc')
-rw-r--r--gcc/testsuite/gcc.dg/gupc/passing-arg-makes-pts-from-int.upc18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gupc/passing-arg-makes-pts-from-int.upc b/gcc/testsuite/gcc.dg/gupc/passing-arg-makes-pts-from-int.upc
new file mode 100644
index 00000000000..c173c43ddfa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gupc/passing-arg-makes-pts-from-int.upc
@@ -0,0 +1,18 @@
+/* Passing argument attempts to make a UPC pointer-to-shared
+ value from an integer.
+ { dg-do compile }
+ { dg-options "-fupc-threads=2" } */
+
+/* The base address of the UPC shared section */
+extern char __upc_shared_start[1];
+
+
+
+
+extern void proc (shared int *arg);
+
+int main()
+{
+ proc (0x4000); /* { dg-error "passing argument 1 of 'proc' attempts to make a UPC pointer-to-shared value from an integer" } */
+ return 0;
+}