Home | History | Annotate | Download | only in plugin2
      1 // Copyright 2016 The Go Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style
      3 // license that can be found in the LICENSE file.
      4 
      5 package main
      6 
      7 //#include <errno.h>
      8 //#include <string.h>
      9 import "C"
     10 
     11 // #include
     12 // void cfunc() {} // uses cgo_topofstack
     13 
     14 import (
     15 	"common"
     16 	"strings"
     17 )
     18 
     19 func init() {
     20 	_ = strings.NewReplacer() // trigger stack unwind, Issue #18190.
     21 	C.strerror(C.EIO)         // uses cgo_topofstack
     22 	common.X = 2
     23 }
     24 
     25 func main() {
     26 	panic("plugin1.main called")
     27 }
     28