From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id 68BB82F7C3 for ; Wed, 18 Apr 2001 19:07:42 -0400 (EDT) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id f3IN4Kt25113 for axp-list@listman.redhat.com; Wed, 18 Apr 2001 19:04:20 -0400 Received: from smtp1.arcip.net (da01a-srvutl01.arcommunications.net [216.168.64.3]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id f3IN4KC25107 for ; Wed, 18 Apr 2001 19:04:20 -0400 Received: from da01a-srvmal01.arcommunications.net (da01a-srvmal01.arcommunications.net [216.168.64.11]) by smtp1.arcip.net (Postfix) with ESMTP id 1D7F232212 for ; Wed, 18 Apr 2001 18:07:24 -0500 (CDT) Received: from redadair.gxt.com (204.27.213.193) by da01a-srvmal01.arcommunications.net (NPlex 5.1.056) id 3A7D07E8001F35CF for axp-list@redhat.com; Wed, 18 Apr 2001 18:07:23 -0500 Received: from weasel.gxt.com (weasel.gxt.com [172.18.0.151]) by redadair.gxt.com (8.10.2/8.10.2) with ESMTP id f3INaJT28384 for ; Wed, 18 Apr 2001 18:36:19 -0500 Received: from gxt.com (athalon.gxt.com [172.18.0.6]) by weasel.gxt.com (8.8.5/8.8.5) with ESMTP id SAA23623 for ; Wed, 18 Apr 2001 18:32:14 -0500 Message-ID: <3ADE1EAA.49264862@gxt.com> Date: Wed, 18 Apr 2001 18:09:30 -0500 From: "P.TURLAIS" X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: gcc 2.96 optimization bug on RedHat7.0/alpha References: <200104180432.XAA03440@zakon.math.purdue.edu> <3ADDAF37.18D256A1@voicenet.com> <20010418085548.A28346@ellpspace.math.ualberta.ca> <3ADE12A4.777D7877@voicenet.com> <20010418153340.A28974@ellpspace.math.ualberta.ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: Michal Jaegermann wrote: > > On Wed, Apr 18, 2001 at 06:18:13PM -0400, Uncle George wrote: > > Its not my code segment, and from my experience a union might be better. > > although from this discourse not safe either. > > > > the code as stated should: > > 1) take address of x > > 2) make into int ptr > > 3) add 1 to ptr ( value of 4 bec its an int ptr ) > > 4) fetch integer from the address as calculated. > > Well, yes, you translated the code from C to English. But the > question really was what you expect that it will happen after these > operations and what kind of a _meaning_ you ascribe to that. i0 should contain the bit sign, the exponent and a part of the mantissa. i1 should contain the rest of the mantissa. You can use these values for a conversion to another FP format ( VAX ( G or F ? ), IBM, CRAY ), to implement a function using tables rather than math calls, to use the mantissa as an hash code ( because the magnitude changes a lot, and a conversion to int doesn't give you a good hash function ) .... For me the semantic of the code is perfectly defined ( for a low-endian machine supporting ieee754, for a big-endian, you have to switch i0 & i1 ). > > It should not matter if at x there is 8 bytes of a double, as that > > distinction is superflous to the equation. > > But if you think that some consistent results should come from this > program then you assume that such "pointer puns" have a well defined > semantics. I do not recall that they ever had. Hum, I would say that a pointer is a pointer to an area. The fact that you interpret the content of this area the wrong way is one thing, the fact that this content changes because of a compilation flag is another thing. May be the pointer to an argument is undefined ( I don't think so, but I have no C ISO standards near me ... ) ? Regards. -- Pierre TURLAIS