llvm-project/llgo/test/execution/new.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
207 B
Go
Raw Normal View History

// RUN: llgo -o %t %s
// RUN: %t 2>&1 | FileCheck %s
// CHECK: 0
// CHECK-NEXT: 2
// CHECK-NEXT: 4
package main
func main() {
x := new(int)
println(*x)
*x = 2
println(*x)
*x = *x * *x
println(*x)
}