// +build ignore

package main

import (
	"os"
	"runtime"
	"unsafe"
)

func main() {
	for i := 0; i < 100; i++ {
		runtime.GC()
	}

	var offset uintptr
	if len(os.Args) >= 2 {
		switch os.Args[1] {
		case "fatal":
			offset = 4 << 10
		case "panic":
			offset = 0
		}
	}

	var i *int
	i = (*int)(unsafe.Pointer(offset))
	*i++
}
