delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
From: | Rugxulo <rugxulo AT gmail DOT com> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Ruby 1.8.7 (pl174) "make test" fails (floating point) *only* with |
default CFLAGS -O2 | |
Date: | Sun, 27 Sep 2009 12:40:05 -0700 (PDT) |
Organization: | http://groups.google.com |
Lines: | 69 |
Message-ID: | <7ac90bf8-5f37-466d-b531-211b75874bab@a6g2000vbp.googlegroups.com> |
NNTP-Posting-Host: | 65.13.115.246 |
Mime-Version: | 1.0 |
X-Trace: | posting.google.com 1254080405 10213 127.0.0.1 (27 Sep 2009 19:40:05 GMT) |
X-Complaints-To: | groups-abuse AT google DOT com |
NNTP-Posting-Date: | Sun, 27 Sep 2009 19:40:05 +0000 (UTC) |
Complaints-To: | groups-abuse AT google DOT com |
Injection-Info: | a6g2000vbp.googlegroups.com; posting-host=65.13.115.246; |
posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO | |
User-Agent: | G2/1.0 |
X-HTTP-UserAgent: | Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) |
AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.21 Safari/532.0,gzip(gfe),gzip(gfe) | |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Hey guys, I've never written anything in Ruby, but I did for laughs download latest 1.8.7 source (from 12 June 2009) since 1.9.x doesn't support DJGPP any more (for various reasons, esp. no maintainer). Mainly I was just wanting to test still more Befunge93 interpreters (since I discovered that language recently, heh). ;-) http://www.splatbang.com/rubyquiz/quiz.rhtml?id=184_Befunge http://catseye.tc/projects/bef/ http://board.flatassembler.net/topic.php?t=10599 Anyways, Ruby compiles cleanly after "./configure && make" although djgpp/configure.bat etc. exists (and doesn't work anymore, AFAICT). I'm using GCC 4.4.1, DJDEV 2.04, etc. It's probably a bug or regression in GCC, who knows, but using the default "-g -O2" CFLAGS, "make test" fails in a few floating point tests while -O or -Os everything is successful. ======================================= [ Vista/DJGPP ] - Sun 09/27/2009 >ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) [i786-msdosdjgpp] [ Vista/DJGPP ] - Sun 09/27/2009 >make test not ok float 1 -- ./sample/test.rb:1226 not ok float 2 -- ./sample/test.rb:1227 not ok float 3 -- ./sample/test.rb:1228 not ok float 4 -- ./sample/test.rb:1229 not ok float 5 -- ./sample/test.rb:1230 not ok float 6 -- ./sample/test.rb:1231 not ok float 7 -- ./sample/test.rb:1232 not ok float 8 -- ./sample/test.rb:1233 not ok float 9 -- ./sample/test.rb:1234 test failed make.exe: *** [test] Error 1 [ Vista/DJGPP ] - Sun 09/27/2009 >sed 1226,1234!d sample/test.rb test_ok(2.6.floor == 2) test_ok((-2.6).floor == -3) test_ok(2.6.ceil == 3) test_ok((-2.6).ceil == -2) test_ok(2.6.truncate == 2) test_ok((-2.6).truncate == -2) test_ok(2.6.round == 3) test_ok((-2.4).truncate == -2) test_ok((13.4 % 1 - 0.4).abs < 0.0001) [ Vista/DJGPP ] - Sun 09/27/2009 >grep CFLAGS makefile CFLAGS = -g -O2 ${cflags} -DRUBY_EXPORT LDFLAGS = $(CFLAGS) -L. $(CC) $(CFLAGS) $(CPPFLAGS) -c $< $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(OUTFLAG)$@ -c ext/ extinit.c $(CC) $(CFLAGS) -c $< ======================================= [ Vista/DJGPP ] - Sun 09/27/2009 >ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) [i786-msdosdjgpp] [ Vista/DJGPP ] - Sun 09/27/2009 >make test test succeeded [ Vista/DJGPP ] - Sun 09/27/2009 >grep CFLAGS makefile CFLAGS = -s -O ${cflags} -DRUBY_EXPORT LDFLAGS = $(CFLAGS) -L. $(CC) $(CFLAGS) $(CPPFLAGS) -c $< $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(OUTFLAG)$@ -c ext/ extinit.c $(CC) $(CFLAGS) -c $< =======================================
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |