On Fri, Jan 20, 2012 at 12:39 AM, Ian Lance Taylor <i...@google.com> wrote:
>> Attached patch adds -mieee to tests that need full IEEE compliance to >> pass. While working on patch, I have noticed that go-test.exp doesn't >> pass DEFAULT_GOCFLAGS to go_target_compile procedure in expected >> format (so, these simply get ignored). With this issue fixed, we can >> add -mieee to DEFAULT_GOCFLAGS. Tests, compiled through torture >> procedure, expects their special flags in a separate driver file. >> >> Attached patch fixes all "floating point errors" on >> alphaev68-pc-linux-gnu through these two methods. >> >> 2012-01-19 Uros Bizjak <ubiz...@gmail.com> >> >> * go.test/go-test.exp (go-gc-tests): Add -mieee to DEFAULT_GOCFLAGS >> for alpha*-*-* and sh*-*-* to enable full IEEE compliance mode. >> Pass correctly formatted options to go_target_compile. >> * go.test/test/fixedbugs/bug321.x: New file. >> * go.test/test/zerodivide.x: Ditto. >> * go.test/test/floatcmp.x: Ditto. >> >> Patch was tested on alphaev68-pc-linux-gnu and x86_64-pc-linux-gnu. >> >> OK for mainline SVN? > > I did implement support for .x files in go-test.exp for some reason, but > actually I should not have. I want the contents of the go.test/test > directory to be an exact copy of the master Go testsuite except for the > README.gcc file, which it is. So I would like to see this fixed in some > other way. Sorry. > > And I just have to repeat that this patch is an ugly ugly hack, since > -mieee should be the default. Perhaps we should investigate having > gcc/go/gospec.c or gcc/go/lang-specs.h somehow add -mieee for those > targets which require it. OK, I agree. But please note that the patch also includes a fix to pass correctly formatted options to go_target_compile. I guess this part should be installed anyway, otherwise go_target_compile simply ignores passed extra options. Uros.