From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2916 invoked by alias); 30 Mar 2008 15:56:42 -0000 Received: (qmail 2837 invoked by alias); 30 Mar 2008 15:56:00 -0000 Date: Sun, 30 Mar 2008 15:56:00 -0000 Message-ID: <20080330155600.2836.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/30911] VRP fails to eliminate range checks in Ada code In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenther at suse dot de" 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: 2008-03/txt/msg02449.txt.bz2 ------- Comment #63 from rguenther at suse dot de 2008-03-30 15:56 ------- Subject: Re: VRP fails to eliminate range checks in Ada code On Sun, 30 Mar 2008, ebotcazou at gcc dot gnu dot org wrote: > ------- Comment #62 from ebotcazou at gcc dot gnu dot org 2008-03-30 15:45 ------- > > Yes, even with -gnato. With -gnato it checks that the > > addition doesn't overflow. > > Oh, sorry, I thought we were talking about the overflow check... > > > But there are no checks on the array access. It looks like the f-e > > doesn't generate them in the first place (as opposed to fold or gigi > > making a mistake). > > This is as documented in the GNAT manual, section 3.2.4 Validity Checking. > You need to pass -gnatVs to have them. So even GNAT assumes parameter values are in-range? Wouldn't that cause an bounded error to become an unbounded error if it were out-of-range? I'm somewhat confused on what the Ada language specification is and what is GNAT implementation freedom... Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30911