This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[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
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 6 Jun 2011 09:06:11 +0000
- Subject: [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
- Auto-submitted: auto-generated
- References: <bug-49279-4@http.gcc.gnu.org/bugzilla/>
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.