From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 17740 invoked from network); 12 Jul 1999 23:24:17 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 12 Jul 1999 23:24:17 -0000 Received: from buster.bfr.co.il (root@morannon.bfr.co.il [192.116.142.129]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id TAA18158 for ; Mon, 12 Jul 1999 19:18:18 -0400 Received: from vermis.bfr.co.il (vermis.bfr.co.il [128.253.154.43]) by buster.bfr.co.il (8.8.5/8.8.5) with ESMTP id CAA19538 for ; Tue, 13 Jul 1999 02:18:09 +0300 Received: (from abel@localhost) by vermis.bfr.co.il (8.9.3/8.8.5) id AAA29685; Tue, 13 Jul 1999 00:39:24 +0300 Sender: abel@bfr.co.il To: axp-list@redhat.com Subject: Re: an evil memcpy() optimizer bug! (egcs-1.1.2, alphaev6, linux) References: <378A21C6.1E094CB4@paralleldata.com> <378A384F.3439D26A@voicenet.com> <378A4530.814245F6@paralleldata.com> <378A677E.60F3900D@paralleldata.com> Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII From: abel@bfr.co.il (Alexander L. Belikoff) Date: 13 Jul 1999 00:39:22 +0300 In-Reply-To: "Wes Bauske"'s message of "Mon, 12 Jul 1999 17:09:02 -0500" Message-ID: X-Mailer: Gnus v5.6.45/XEmacs 20.4 - "Emerald" "Wes Bauske" writes: > I have other UNIX boxes where I get similar failures to your's. > Passing a float/double as an arg doesn't always produce the result > you would expect with high optimizations. So, I avoid it in > general in my own code. To me, it's just an idiosyncracy of coding > and optimizing C. I've seen it off and on over the past 2 years > or so. Possibly the optimizations in the newer compilers are > trying to be smarter than previously. > > One of the previous replies at least now explains why it's a > problem, namely, the variable comes into the routine in a > FP reg and if you want to muck with it's address, there isn't > one without eliminating the optimization of using FP regs for > calling args. Uh... I'm actually on my way to check the Steel book on that, but isn't it the case that the optimizer should just drop certain optimizations in case the programmer stands on the way - like in the situation above, shouldn't it just make a temp. variable and use it instead of a register? Besides, in case I have an optimized version of put_f8 in a separate file (with v passed in a register) and I try to call it from an unoptimized module - how would the compiler figure out the calling convention during the compilation stage? -- Alexander L. Belikoff Bloomberg L.P. / BFM Financial Research Ltd. abel@vallinor4.com, abel@bfr.co.il