From 4d95fe6653b531b549b68f83c85d5a66468a44cf Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Wed, 29 Jun 2022 15:39:01 -0700 Subject: [PATCH] test: add regress test for #53619 Works with cmd/compile, but fails with gccgo currently. Updates #53619. Change-Id: I787faa9584cc33bd851c9cc8f146c91f4eb36fc9 Reviewed-on: https://go-review.googlesource.com/c/go/+/415238 Reviewed-by: Ian Lance Taylor TryBot-Result: Gopher Robot Auto-Submit: Matthew Dempsky Reviewed-by: Cuong Manh Le Run-TryBot: Matthew Dempsky --- test/fixedbugs/issue53619.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/fixedbugs/issue53619.go diff --git a/test/fixedbugs/issue53619.go b/test/fixedbugs/issue53619.go new file mode 100644 index 0000000000..2b6d047d33 --- /dev/null +++ b/test/fixedbugs/issue53619.go @@ -0,0 +1,21 @@ +// run + +// Copyright 2022 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. + +package main + +var c = b +var d = a + +var a, b any = any(nil).(bool) + +func main() { + if c != false { + panic(c) + } + if d != false { + panic(d) + } +} -- 2.48.1