This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/13992] Apparent vrsave problem with complex Altivec code and -O2
- From: "tjw at omnigroup dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Feb 2004 08:00:07 -0000
- Subject: [Bug optimization/13992] Apparent vrsave problem with complex Altivec code and -O2
- References: <20040203082500.13992.tjw@omnigroup.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From tjw at omnigroup dot com 2004-02-04 08:00 -------
Hrm. I thought of that, but was misled by the fact that adding -Wstrict-aliasing didn't report any
warnings. I'm probably misunderstanding what this warning does (certainly looking at the only test
case for it I could find (gcc/testsuite/gcc.dg/alias-1.c) yields warnings that don't make sense.
Anyway, I'll try your suggestion, but I'd also think that if the -W flag is going to have a name of
'strict-aliasing' then it would be less confusing the more bad constructs it could detect.
As an example:
int x(float *f)
{
return *(int *)f;
}
compiled with:
$PREFIX/bin/g++ -O2 -Wall -fstrict-aliasing -Wstrict-aliasing -c foo.cpp
yields no warnings. Maybe I need to go read the language laws on aliasing more closely, but I
thought this was a classic example.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13992