Peter Collingbourne | ad9841e | 2014-11-27 00:06:42 +0000 | [diff] [blame] | 1 | // RUN: llgo -o %t %s |
2 | // RUN: %t 2>&1 | FileCheck %s | ||||
3 | |||||
4 | // CHECK: 0 | ||||
5 | // CHECK-NEXT: 2 | ||||
6 | // CHECK-NEXT: 4 | ||||
7 | |||||
8 | package main | ||||
9 | |||||
10 | func main() { | ||||
11 | x := new(int) | ||||
12 | println(*x) | ||||
13 | *x = 2 | ||||
14 | println(*x) | ||||
15 | *x = *x * *x | ||||
16 | println(*x) | ||||
17 | } |