From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21868 invoked by alias); 19 Jan 2010 22:59:03 -0000 Received: (qmail 21820 invoked by uid 48); 19 Jan 2010 22:58:50 -0000 Date: Tue, 19 Jan 2010 22:59:00 -0000 Message-ID: <20100119225850.21819.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/42810] Enumeration with sequential values has its for-loop exit condition optimized out. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tony3 at GarlandConsulting dot us" 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-01/txt/msg02363.txt.bz2 ------- Comment #5 from tony3 at GarlandConsulting dot us 2010-01-19 22:58 ------- Created an attachment (id=19664) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19664&action=view) Assembler input which works correctly compiled at -O1 In this sample, the exit condition is properly tested as can be seen in the assembly listing. The difference between this file and test.s shows how the exit condition gets optimized out. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42810