| // Copyright 2014 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| // Check that {5,6,8,9}g/ggen.c:clearfat is zeroing the entire object. |
| var decls, calls bytes.Buffer |
| for i := 1; i <= ntest; i++ { |
| decls.WriteString(strings.Replace(decl, "$", s, -1)) |
| calls.WriteString(strings.Replace("poison$()\n\tclearfat$()\n\t", "$", s, -1)) |
| program = strings.Replace(program, "$DECLS", decls.String(), 1) |
| program = strings.Replace(program, "$CALLS", calls.String(), 1) |
| var program = `package main |
| println("failed", count, "case(s)") |
| // Grow and poison the stack space that will be used by clearfat$ |
| // println("clearfat$: index", i, "expected 0, got", x) |