From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QcREt-0001YE-O8 for garchives@archives.gentoo.org; Fri, 01 Jul 2011 00:05:43 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B7EBF1C0D1; Fri, 1 Jul 2011 00:04:28 +0000 (UTC) Received: from qmta14.emeryville.ca.mail.comcast.net (qmta14.emeryville.ca.mail.comcast.net [76.96.27.212]) by pigeon.gentoo.org (Postfix) with ESMTP id 6F9661C0D1 for ; Fri, 1 Jul 2011 00:04:28 +0000 (UTC) Received: from omta06.emeryville.ca.mail.comcast.net ([76.96.30.51]) by qmta14.emeryville.ca.mail.comcast.net with comcast id 2Q3n1h00716AWCUAEQ4RJj; Fri, 01 Jul 2011 00:04:25 +0000 Received: from ajax ([24.11.47.14]) by omta06.emeryville.ca.mail.comcast.net with comcast id 2Q4U1h00p0JMh7c8SQ4V51; Fri, 01 Jul 2011 00:04:30 +0000 Date: Thu, 30 Jun 2011 20:04:24 -0400 From: Frank Peters To: gentoo-amd64@lists.gentoo.org Subject: Re: [gentoo-amd64] Re: GCC-4.5.2 Has Serious Problems Message-Id: <20110630200424.0d6d49ef.frank.peters@comcast.net> In-Reply-To: References: <20110630174530.9bcbcd47.frank.peters@comcast.net> X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; x86_64-unknown-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-amd64@lists.gentoo.org Reply-to: gentoo-amd64@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: X-Archives-Hash: a35e7233f4cbcb5c75425e247aeba67b On Fri, 01 Jul 2011 02:44:36 +0300 Nikos Chantziaras wrote: > > > > Your code is buggy, because you're breaking C's aliasing rules. You are > > not allowed to use a different pointer type to dereference a variable of > > a different type. Doing so results in undefined behavior. > Well, the error occurs only within the loop structure. If I manually "unroll" the loop using the same pointers there is no error when compiled with "O2." IOW, the problem is how the loop is optimized under -O2. Frank Peters