From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10283 invoked by alias); 3 May 2005 01:46:13 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 10240 invoked from network); 3 May 2005 01:46:09 -0000 Received: from unknown (HELO vlsi1.ultra.nyu.edu) (128.122.140.213) by sourceware.org with SMTP; 3 May 2005 01:46:09 -0000 Received: by vlsi1.ultra.nyu.edu (4.1/1.34) id AA26099; Mon, 2 May 05 21:46:59 EDT Date: Tue, 03 May 2005 01:46:00 -0000 From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner) Message-Id: <10505030146.AA26099@vlsi1.ultra.nyu.edu> To: dnovillo@redhat.com Subject: Re: Q about Ada and value ranges in types Cc: gcc@gcc.gnu.org X-SW-Source: 2005-05/txt/msg00064.txt.bz2 I am tracking an ICE in VRP that triggers only in Ada. Given this: 1 D.1480_32 = nam_30 - 300000361; 2 if (D.1480_32 <= 1) goto ; else goto ; 3 :; 4 D.1480_94 = ASSERT_EXPR ; 5 goto (); for name D.1480_94. However, the type of D.1480 is: (gdb) ptu type const types__name_id___XDLU_300000000__399999999 max RM size > My question is, is Ada emitting an always-false predicate in line #2? Or is it a bug? You're not showing where this comes from, so it's hard to say. However D.1480 is created by the gimplifier, not the Ada front end. There could easily be a typing problem in the tree there (e.g., that of the subtraction), but I can't tell for sure. If the Ada language allows that kind of runtime check, then my fix to VRP will be different. I don't see it as a language issue: I'd argue that the tree in statement 2 is invalid given the typing. That should be true for any language. (Note that there's a system problem and email to this address won't be received until tomorrow afternoon.)