src/cmd/go/testdata/script/cgo_asm_error.txt
raw| 1 | [!cgo] skip |
| 2 | |
| 3 | # Test that cgo package can't contain a go assembly file. |
| 4 | |
| 5 | # Ensure the build fails and reports that the package has a Go assembly file. |
| 6 | ! go build cgoasm |
| 7 | stderr 'package using cgo has Go assembly file' |
| 8 | |
| 9 | -- go.mod -- |
| 10 | module cgoasm |
| 11 | |
| 12 | go 1.16 |
| 13 | -- p.go -- |
| 14 | package p |
| 15 | |
| 16 | /* |
| 17 | // hi |
| 18 | */ |
| 19 | import "C" |
| 20 | |
| 21 | func F() {} |
| 22 | -- p.s -- |
| 23 | TEXT asm(SB),$0 |
| 24 | RET |
| 25 |