Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: gah4 Newsgroups: comp.compilers Subject: Re: Undefined Behavior Optimizations in Fortran Date: Thu, 26 Jan 2023 17:50:32 -0800 (PST) Organization: Compilers Central Sender: johnl@iecc.com Approved: comp.compilers@iecc.com Message-ID: <23-01-075@comp.compilers> References: <23-01-027@comp.compilers> <23-01-031@comp.compilers> <23-01-041@comp.compilers> <23-01-062@comp.compilers> <23-01-063@comp.compilers> <23-01-073@comp.compilers> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="94396"; mail-complaints-to="abuse@iecc.com" Keywords: Fortran, standards, comment Posted-Date: 26 Jan 2023 21:24:07 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com In-Reply-To: <23-01-073@comp.compilers> Xref: csiph.com comp.compilers:3343 On Thursday, January 26, 2023 at 11:00:02 AM UTC-8, gah4 wrote: (snip) > Now, the original subject of this thread, is the cost vs. benefit of such > optimizations. Not so obvious the benefit, but there is a cost when people > try to debug programs where things are optimized away. > [Gee, it's been a while since I thought about SSP. I believe that IBM wrote > it largely to give people code that would get reasonable numeric answers > with the 360's funky floating point. Then there were a few odds and ends > like RANDU. They never promised the code would work on anything other > than IBM 360 Fortran. -John] It seems that there is also SSP for the IBM 1130, which is 16 bit binary, so probably also a 32 bit two's complement integer. There is a PL/I SSP, but seems not to have RANDU. When I was in high school, we had CALL/OS, with PL/I, and I used the RANDU algorithm, as I didn't have any other one. As you say, it wasn't promised to work with any other Fortran, but others did try to stay compatible with IBM. (But often with non-IBM extensions.) Fortran systems that I know, are good at ignoring fixed point overflow, though often trap or count floating point overflow. [I took a look, RANDU on the 1130 repeated after 2^13 items. Yow. -John]