David Crawshaw | ca0aded | 2015-04-03 12:43:43 -0400 | [diff] [blame] | 1 | // run |
| 2 | |
| 3 | // Copyright 2015 The Go Authors. All rights reserved. |
| 4 | // Use of this source code is governed by a BSD-style |
| 5 | // license that can be found in the LICENSE file. |
| 6 | |
| 7 | // Issue 10320: 7g failed to compile a program because it attempted |
| 8 | // to use ZR as register. Other programs compiled but failed to |
| 9 | // execute correctly because they clobbered the g register. |
| 10 | |
| 11 | package main |
| 12 | |
| 13 | func main() { |
| 14 | var x00, x01, x02, x03, x04, x05, x06, x07, x08, x09 int |
| 15 | var x10, x11, x12, x13, x14, x15, x16, x17, x18, x19 int |
| 16 | var x20, x21, x22, x23, x24, x25, x26, x27, x28, x29 int |
| 17 | var x30, x31, x32 int |
| 18 | |
| 19 | _ = x00 |
| 20 | _ = x01 |
| 21 | _ = x02 |
| 22 | _ = x03 |
| 23 | _ = x04 |
| 24 | _ = x05 |
| 25 | _ = x06 |
| 26 | _ = x07 |
| 27 | _ = x08 |
| 28 | _ = x09 |
| 29 | |
| 30 | _ = x10 |
| 31 | _ = x11 |
| 32 | _ = x12 |
| 33 | _ = x13 |
| 34 | _ = x14 |
| 35 | _ = x15 |
| 36 | _ = x16 |
| 37 | _ = x17 |
| 38 | _ = x18 |
| 39 | _ = x19 |
| 40 | |
| 41 | _ = x20 |
| 42 | _ = x21 |
| 43 | _ = x22 |
| 44 | _ = x23 |
| 45 | _ = x24 |
| 46 | _ = x25 |
| 47 | _ = x26 |
| 48 | _ = x27 |
| 49 | _ = x28 |
| 50 | _ = x29 |
| 51 | |
| 52 | _ = x30 |
| 53 | _ = x31 |
| 54 | _ = x32 |
| 55 | } |