summaryrefslogtreecommitdiff
path: root/gcc/testsuite/go.go-torture/execute/struct-2.go
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/go.go-torture/execute/struct-2.go')
-rw-r--r--gcc/testsuite/go.go-torture/execute/struct-2.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/go.go-torture/execute/struct-2.go b/gcc/testsuite/go.go-torture/execute/struct-2.go
new file mode 100644
index 000000000..cc01f6b9c
--- /dev/null
+++ b/gcc/testsuite/go.go-torture/execute/struct-2.go
@@ -0,0 +1,7 @@
+package main
+
+func main() {
+ type s struct { x int; y int; };
+ var ret s = s{1, 2};
+ if ret.y - (ret.x + ret.x) != 0 { panic(0) }
+}