From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7837 invoked by alias); 6 Dec 2002 21:26:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 7778 invoked by uid 71); 6 Dec 2002 21:26:02 -0000 Date: Fri, 06 Dec 2002 13:26:00 -0000 Message-ID: <20021206212602.7776.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Carlos O'Donell Subject: Re: optimization/7726: Fails to produce the correct implementation-dependant output for loop optimization under x86 -> optimizes away a loop that should complete Reply-To: Carlos O'Donell X-SW-Source: 2002-12/txt/msg00392.txt.bz2 List-Id: The following reply was made to PR optimization/7726; it has been noted by GNATS. From: Carlos O'Donell To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Cc: Subject: Re: optimization/7726: Fails to produce the correct implementation-dependant output for loop optimization under x86 -> optimizes away a loop that should complete Date: Fri, 6 Dec 2002 16:23:05 -0500 > State-Changed-From-To: open->feedback > State-Changed-By: bangerth > State-Changed-When: Fri Dec 6 13:01:29 2002 > State-Changed-Why: > Hm, the code goes into an endless loop on my system also > without optimization and with all the compilers I have > (i.e. gcc2.95, 3.0, 3.2, 3.2.2pre, 3.3pre, and icc7). > Are you sure that the overflow you are exploiting is > really defined in ISO C? Unsigned overflow is defined. It is GCC's inconsistent implementation-dependant conversion that is causing the problem. "The comparison is between to signed values that gcc must convert. This conversion is implementation-dependant. As such, the implementation-dependant behaviour cannot be optimized away and must remain consistent across optimization levels." - Carlos c.