[Bug c++/49279] [4.5/4.6/4.7 Regression] Optimization incorrectly presuming constant variable inside loop in g++ 4.5 and 4.6 with -O2 and -O3 for x86_64 targets
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 6 09:06:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49279
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Status|NEW |ASSIGNED
Known to work| |4.4.6
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
Summary|Optimization incorrectly |[4.5/4.6/4.7 Regression]
|presuming constant variable |Optimization incorrectly
|inside loop in g++ 4.5 and |presuming constant variable
|4.6 with -O2 and -O3 for |inside loop in g++ 4.5 and
|x86_64 targets |4.6 with -O2 and -O3 for
| |x86_64 targets
Known to fail| |4.5.4, 4.6.0, 4.7.0
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-06 09:05:21 UTC ---
Passes with -fno-strict-aliasing. Presumably the alias-improvement branch
merge is the real issue. Not sure if it isn't an issue with the testcase
which has
inline const Derived & derived () const
{
return *static_cast < const Derived *>(this);
} inline Derived & derived ()
{
return *static_cast < Derived * >(this);
}
I wasn't able to follow the template instantiation quickly ... ;)
I will have a look.
More information about the Gcc-bugs
mailing list