From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18305 invoked by alias); 25 Sep 2008 10:30:14 -0000 Received: (qmail 17648 invoked by uid 48); 25 Sep 2008 10:28:54 -0000 Date: Thu, 25 Sep 2008 10:30:00 -0000 Message-ID: <20080925102854.17647.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/35723] Can't use run-time array element in character declaration In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "domob 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-09/txt/msg02732.txt.bz2 ------- Comment #2 from domob at gcc dot gnu dot org 2008-09-25 10:28 ------- I guess this is illegal, too: PROGRAM main IMPLICIT NONE CALL test (5, (/ 1, 2, 3, 4, 5, 6, 7, 8, 9 /) ) CONTAINS SUBROUTINE test (n, arr) IMPLICIT NONE INTEGER :: n, arr(:) INTEGER :: i = 5 INTEGER :: local(arr(n)) INTEGER :: local2(arr(i)) ! { dg-error "XXX" } END SUBROUTINE test END PROGRAM main where the definition of local is ok, but local2 is illegal. This program is however accepted with gfortran without your patch. I will implement general checking of the references for EXPR_VARIABLEs that have one. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35723