From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2617 invoked by alias); 2 Oct 2007 11:27:27 -0000 Received: (qmail 2538 invoked by uid 48); 2 Oct 2007 11:27:15 -0000 Date: Tue, 02 Oct 2007 11:27:00 -0000 Message-ID: <20071002112715.2537.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/31346] wrong values for ubound and size of deferred shape arrays In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "fxcoudert at gcc dot gnu dot org" 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: 2007-10/txt/msg00128.txt.bz2 ------- Comment #6 from fxcoudert at gcc dot gnu dot org 2007-10-02 11:27 ------- (In reply to comment #5) > Really? From how I read the standard (F2K draft), UBOUND(ARRAY, DIM) has (in > this case) "a value equal to the upper bound for subscript DIM of ARRAY". I > can't see it allowing returning random values such as 2193121. The program shown is not valid Fortran, the processor can do whatever it wants. A most sensible choice would be to reject it, of course: that's what g95 does (and g77 also, according to Paul) but others have chosen to segfault (Intel, Sun). -- fxcoudert at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- GCC build triplet|x86_64-linux-gnu | GCC host triplet|x86_64-linux-gnu | GCC target triplet|x86_64-linux-gnu | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31346