On Wed, Jan 18, 2012 at 3:17 PM, Ian Lance Taylor <i...@google.com> wrote:
>>> This patch to the Go testsuite driver recognizes a few more test lines >>> in Go tests. I somehow failed to notice these the last time I updated >>> the Go testsuite. This patch includes a couple of changes to make the >>> newly recognized tests pass. Ran Go testsuite on >>> x86_64-unknown-linux-gnu. Committed to mainline. >> >> Some of the go tests require explicit -mieee compile flag [1]. Is >> there a way to conditionally pass this flag to the compiler? > > What does Java do? Nothing... while the library is compiled with -mieee (the same as libgo), the user is still expected to pass -mieee as a compile flag for full IEEE compliance. > > For Go, like Java, we should turn on the -mieee option by default. Both > Go and Java specify the floating point model precisely--Go not as > precisely as Java, but it does require denormals to be supported. > Unfortunately I'm not sure how to do that. My best idea at the moment > is to add a new target hook to common/common-target.def meaning "we > actually care about floating point." > > That said, it would be easy enough to handle -mieee to way we handle > -minline-all-stringops in libgo/configure.ac and libgo/Makefile.am. > That would let us use -mieee when building and testing libgo. But it > should really be the default in all cases, not just libgo. While looking at remaining failures, it looks to me that go tests expects full IEEE compliance. I have addressed this via patch that adds -mieee to either DEFAULT_GOCFLAGS in go-test.exp or to additional_flags via alternate driver. This fixes all "floating point error" go.test failures, remaining are: FAIL: go.test/test/chan/select2.go execution, -O2 -g WARNING: program timed out. FAIL: ./select5-out.go compilation, -O2 -g where select2.go claims too much memory: PASS: go.test/test/chan/select2.go compilation, -O2 -g Setting LD_LIBRARY_PATH to .:/space/uros/gcc-build-go/alphaev68-unknown-linux-gnu/./libgo/.libs:/space/uros/gcc-build-go/gcc:.:/space/uros/gcc-build-go/alphaev68-unknown-linux-gnu/./libgo/.libs:/space/uros/gcc-build-go/gcc spawn [open ...]^M BUG: too much memory for 100,000 selects: 2098576 FAIL: go.test/test/chan/select2.go execution, -O2 -g I will propose the patch in a follow-up message. Uros.