summaryrefslogtreecommitdiffstats
path: root/llgo/test/execution/assignment/dereferencing.go
diff options
context:
space:
mode:
Diffstat (limited to 'llgo/test/execution/assignment/dereferencing.go')
-rw-r--r--llgo/test/execution/assignment/dereferencing.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/llgo/test/execution/assignment/dereferencing.go b/llgo/test/execution/assignment/dereferencing.go
new file mode 100644
index 00000000000..607e28d5909
--- /dev/null
+++ b/llgo/test/execution/assignment/dereferencing.go
@@ -0,0 +1,13 @@
+// RUN: llgo -o %t %s
+// RUN: %t 2>&1 | FileCheck %s
+
+// CHECK: 123
+
+package main
+
+func main() {
+ var x int
+ px := &x
+ *px = 123
+ println(x)
+}
OpenPOWER on IntegriCloud