Gentoo Archives: gentoo-amd64

From: Frank Peters <frank.peters@×××××××.net>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: GCC-4.5.2 Has Serious Problems
Date: Fri, 01 Jul 2011 00:05:43
Message-Id: 20110630200424.0d6d49ef.frank.peters@comcast.net
In Reply to: [gentoo-amd64] Re: GCC-4.5.2 Has Serious Problems by Nikos Chantziaras
1 On Fri, 01 Jul 2011 02:44:36 +0300
2 Nikos Chantziaras <realnc@×××××.de> wrote:
3
4 > >
5 > > Your code is buggy, because you're breaking C's aliasing rules. You are
6 > > not allowed to use a different pointer type to dereference a variable of
7 > > a different type. Doing so results in undefined behavior.
8 >
9
10 Well, the error occurs only within the loop structure. If
11 I manually "unroll" the loop using the same pointers there
12 is no error when compiled with "O2."
13
14 IOW, the problem is how the loop is optimized under -O2.
15
16 Frank Peters

Replies

Subject Author
[gentoo-amd64] Re: GCC-4.5.2 Has Serious Problems Nikos Chantziaras <realnc@×××××.de>