]> Cypherpunks.ru repositories - gostls13.git/blobdiff - test/float_lit3.go
cmd/compile/internal/inline: score call sites exposed by inlines
[gostls13.git] / test / float_lit3.go
index 43dca9cfa1f7c86193d52d2f5aa04759fe8186de..37a1289fb9dd21a22e1b10961e8e94d815e9cbb4 100644 (file)
@@ -2,7 +2,7 @@
 
 // Check flagging of invalid conversion of constant to float32/float64 near min/max boundaries.
 
-// Copyright 2014 The Go Authors.  All rights reserved.
+// 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.
 
@@ -29,20 +29,19 @@ const (
 var x = []interface{}{
        float32(max32 + ulp32/2 - 1),             // ok
        float32(max32 + ulp32/2 - two128/two256), // ok
-       float32(max32 + ulp32/2),                 // ERROR "constant 3\.40282e\+38 overflows float32"
+       float32(max32 + ulp32/2),                 // ERROR "constant 3\.40282e\+38 overflows float32|cannot convert.*to type float32"
 
        float32(-max32 - ulp32/2 + 1),             // ok
        float32(-max32 - ulp32/2 + two128/two256), // ok
-       float32(-max32 - ulp32/2),                 // ERROR "constant -3\.40282e\+38 overflows float32"
+       float32(-max32 - ulp32/2),                 // ERROR "constant -3\.40282e\+38 overflows float32|cannot convert.*to type float32"
 
        // If the compiler's internal floating point representation
        // is shorter than 1024 bits, it cannot distinguish max64+ulp64/2-1 and max64+ulp64/2.
-       // gc uses fewer than 1024 bits, so allow it to print the overflow error for the -1 case.
        float64(max64 + ulp64/2 - two1024/two256), // ok
-       float64(max64 + ulp64/2 - 1),              // GC_ERROR "constant 1\.79769e\+308 overflows float64"
-       float64(max64 + ulp64/2),                  // ERROR "constant 1\.79769e\+308 overflows float64"
+       float64(max64 + ulp64/2 - 1),              // ok
+       float64(max64 + ulp64/2),                  // ERROR "constant 1\.79769e\+308 overflows float64|cannot convert.*to type float64"
 
        float64(-max64 - ulp64/2 + two1024/two256), // ok
-       float64(-max64 - ulp64/2 + 1),              // GC_ERROR "constant -1\.79769e\+308 overflows float64"
-       float64(-max64 - ulp64/2),                  // ERROR "constant -1\.79769e\+308 overflows float64"
+       float64(-max64 - ulp64/2 + 1),              // ok
+       float64(-max64 - ulp64/2),                  // ERROR "constant -1\.79769e\+308 overflows float64|cannot convert.*to type float64"
 }