This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/43529] New: G++ doesn't optimize away empty loop when index is a double
- From: "evouga at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Mar 2010 23:42:15 -0000
- Subject: [Bug c++/43529] New: G++ doesn't optimize away empty loop when index is a double
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Empty loops where the loop index is an integer are optimized away, but the
following loop is not (presumably because it is more difficult to prove that it
terminates in finite time?)
int main()
{
for(double i=0; i<1e9; i+=1);
}
Command line: g++ -O3
--
Summary: G++ doesn't optimize away empty loop when index is a
double
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: evouga at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43529