summaryrefslogtreecommitdiff
path: root/misc/cgo/errors/err2.go
diff options
context:
space:
mode:
Diffstat (limited to 'misc/cgo/errors/err2.go')
-rw-r--r--misc/cgo/errors/err2.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/misc/cgo/errors/err2.go b/misc/cgo/errors/err2.go
new file mode 100644
index 000000000..0c64ffeeb
--- /dev/null
+++ b/misc/cgo/errors/err2.go
@@ -0,0 +1,13 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "C"
+
+func main() {
+ s := ""
+ _ = s
+ C.malloc(s) // ERROR HERE
+}