From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17849 invoked by alias); 16 Nov 2002 10:36:06 -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 17812 invoked by uid 71); 16 Nov 2002 10:36:04 -0000 Resent-Date: 16 Nov 2002 10:36:04 -0000 Resent-Message-ID: <20021116103604.17810.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, fls@ti.com Resent-Reply-To: gcc-gnats@gcc.gnu.org, flemming.e@get2net.dk Received: (qmail 17311 invoked by uid 61); 16 Nov 2002 10:31:41 -0000 Message-Id: <20021116103141.17310.qmail@sources.redhat.com> Date: Fri, 22 Nov 2002 08:17:00 -0000 From: flemming.e@get2net.dk Reply-To: flemming.e@get2net.dk To: gcc-gnats@gcc.gnu.org Cc: fls@ti.com X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify: fls@ti.com Subject: c/8604: -1 evaluates wrong or causes compiler error X-SW-Source: 2002-11/txt/msg00825.txt.bz2 List-Id: >Number: 8604 >Category: c >Synopsis: -1 evaluates wrong or causes compiler error >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Sat Nov 16 02:36:03 PST 2002 >Closed-Date: >Last-Modified: >Originator: Flemming Nyboe >Release: 3.2 >Organization: >Environment: Windows ME Executing GCC from ConTEXT, but DOS prompt execution gives same error. >Description: I'm getting an ICE on line 253 in main() "b=b-1". "b--" gives the same error. If I change that line to "b=b+1" I get no error. Further, look at GC2.c line 193. The expression "((LCDint == 0) && (i+1 >= digs))" evaluates correctly. If I write "((LCDint == 0) && (i >= (digs-1)))" it doesn't. The term "(i >= (digs-1)))" always eveluates to false. >How-To-Repeat: Hope you get the same when you compile my code. >Fix: As described in "Description", rearranging terms seem to help. I wonder if there's a special problem with a "-" sign right after an integer variable >Release-Note: >Audit-Trail: >Unformatted: