Commit f85ba7d5 authored by Shenghou Ma's avatar Shenghou Ma

cmd/gc: fix comparison order of parameters in mpcmpfltc(a, b)

It should compare a - b to 0, not b - a to 0.
Fixes #6964.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/39020044
parent 1f20ab11
......@@ -65,7 +65,7 @@ mpcmpfltc(Mpflt *b, double c)
Mpflt a;
mpmovecflt(&a, c);
return mpcmpfltflt(&a, b);
return mpcmpfltflt(b, &a);
}
void
......
// errorcheck
// Copyright 2013 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
func main() {
_ = string(-4 + 2i + 2) // ERROR "-4\+2i"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment