1
0
mirror of https://github.com/golang/go synced 2024-11-26 19:41:19 -07:00
go/test/fixedbugs/issue60582.go
Cuong Manh Le 96d16803c2 cmd/compile: allow ir.OMIN/ir.OMAX in mayCall
CL 496257 adds min/max builtins, which may appear as argument to a
function call, so it will be tested by mayCall. But those ops are not
handled by mayCall, causes the compiler crashes.

Fixes #60582

Change-Id: I729f10bf62b4aad39ffcb1433f576e74d09fdd9a
Reviewed-on: https://go-review.googlesource.com/c/go/+/500575
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
2023-06-05 03:11:36 +00:00

16 lines
276 B
Go

// build
// Copyright 2023 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
import "fmt"
func main() {
a, b := 5, 7
fmt.Println(min(a, b))
fmt.Println(max(a, b))
}