Files
clang-p2996/llgo/test/execution/new.go
Peter Collingbourne ad9841e8ac Initial commit of llgo.
llvm-svn: 222857
2014-11-27 00:06:42 +00:00

18 lines
207 B
Go

// 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)
}