From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9102 invoked by alias); 25 Mar 2010 23:42:27 -0000 Received: (qmail 9061 invoked by uid 48); 25 Mar 2010 23:42:15 -0000 Date: Thu, 25 Mar 2010 23:42:00 -0000 Subject: [Bug c++/43529] New: G++ doesn't optimize away empty loop when index is a double X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "evouga at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg02614.txt.bz2 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