From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 29081 invoked from network); 13 Jul 1999 03:23:17 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 13 Jul 1999 03:23:17 -0000 Received: from paralleldata.com (smtp.paralleldata.com [38.153.145.2]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id XAA02856 for ; Mon, 12 Jul 1999 23:17:14 -0400 Received: by paralleldata.com from localhost (router,SLMail V2.5); Mon, 12 Jul 1999 22:21:38 -0500 Received: by paralleldata.com from paralleldata.com (207.136.51.19::mail daemon; unverified,SLMail V2.5); Mon, 12 Jul 1999 22:21:36 -0500 Sender: "Wsb" Message-ID: <378AA224.88B1D888@paralleldata.com> Date: Mon, 12 Jul 1999 21:19:16 -0500 From: "Wes Bauske" Organization: PDS Inc. X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5-15 i686) X-Accept-Language: en MIME-Version: 1.0 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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit "Alexander L. Belikoff" wrote: > > 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? > Don't know where that optimization is performed. One possible place is for the linker to adjust both modules to "fit", assuming there is argument info in a *.o file. Lot's of my code is in different source files so maybe that is part of the problem too. Don't know. I can guarantee I optimize all code at the same level and still see the problem. You're welcome to code any way you like. I do my best not to use code styles that will break my code when I port to other architectures. This code style can break so I don't use it. Much easier to make the change than to complain to the compiler writers and ask them to fix it. Good to let them know the problem exists though since it does cause headaches/time to track down. Wes