From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32281 invoked by alias); 6 May 2008 14:43:50 -0000 Received: (qmail 31248 invoked by uid 48); 6 May 2008 14:43:07 -0000 Date: Tue, 06 May 2008 14:43:00 -0000 Message-ID: <20080506144307.31247.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/36153] ICE on size with kind parameter In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus 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: 2008-05/txt/msg00436.txt.bz2 ------- Comment #1 from burnus at gcc dot gnu dot org 2008-05-06 14:43 ------- Confirmed. Note: Using -std=f95 the kind= is properly rejected. ==16567== Invalid read of size 4 ==16567== at 0x4605FD: gfc_resolve_expr (resolve.c:2310) ==16567== by 0x465625: resolve_code (resolve.c:6195) ==16567== by 0x468D1B: gfc_resolve_blocks (resolve.c:5988) ==16567== by 0x46560C: resolve_code (resolve.c:6187) ==16567== by 0x466F40: resolve_codes (resolve.c:9121) I think the following comparison does not make sense for KIND= (I have only glanced at it): for (arg = expr->value.function.actual; arg; arg = arg->next) { if (inquiry && arg->next != NULL && arg->next->expr) { if (arg->next->expr->expr_type != EXPR_CONSTANT) break; if ((int)mpz_get_si (arg->next->expr->value.integer) < arg->expr->rank) break; I think this function still assumes that one uses only DIM= and not KIND=. The failing line is the mpz_get_si, although that should work? Allowed options are: SIZE (ARRAY [, DIM, KIND]) -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |ice-on-valid-code Known to fail| |4.3.1 4.4.0 Last reconfirmed|0000-00-00 00:00:00 |2008-05-06 14:43:06 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36153