/
githubmirror
/
go
Обзор
Документация
Войти
/
githubmirror
/
go
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/fixedbugs/issue80097.go
23 строки
615 B
Derek Parker
cmd/compile: don't require Heapaddr for heap vars in dead code
23 июн 2026, 23:07
23 июн 2026, 23:07
9c9e880
Код
Авторство
О чём код?
// compile // Copyright 2026 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. // Issue 80097: ICE "invalid heap allocated var without Heapaddr" // when a heap-escaping variable is declared in unreachable code. // Escape analysis marks the variable as heap-allocated, but because // the declaration is dead, SSA generation never assigns it a heap // address. DWARF generation must tolerate this state. package p var foo = func() int { label: goto label x := [1024 * 64]*[2]*int{} if x != x { _ = x } return 1 }()