This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc 4.4.1/linux 64bit: code crashes with -O3, works with -O2


On Mon, 2010-02-22 at 13:11 -0800, Andrew Pinski wrote:
> On Mon, Feb 22, 2010 at 1:06 PM, Janis Johnson <janis187@us.ibm.com> wrote:
> > If you can reproduce the problem with a small, self-contained test then
> > please file a bug report.  It might be possible to issue a warning or
> > to detect that the loop should not be vectorized.  If not, maybe the
> > compiler should disable vectorization for -fno-strict-aliasing.
> 
> It is not an aliasing issue but an alignment issue.  Anyways this is
> most likely the same as
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43009 .

Yes, that's the problem I had in mind but I was thinking about an
explicit cast to a pointer to more-aligned data in the function that has
the vector loop.  There's no way to warn about the undefined behavior
when the cast is in a different source file.

It's interesting that two reports of failure due to this same undefined
behavior come so close together.

Janis


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]