From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4577 invoked by alias); 26 Mar 2007 06:19:35 -0000 Received: (qmail 4559 invoked by uid 48); 26 Mar 2007 06:19:26 -0000 Date: Mon, 26 Mar 2007 06:19:00 -0000 Message-ID: <20070326061926.4558.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: "pault 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-03/txt/msg02429.txt.bz2 ------- Comment #4 from pault at gcc dot gnu dot org 2007-03-26 07:19 ------- (In reply to comment #3) > I haven't seen anything in the Fortran 2003 standard forcing the subroutines to > be in the contains statement. In this case the interface is said to be implicit and the standard does not require the programme to do the right thing. Use an INTERFACE, as below, or put the subroutine in a module. In either case the interface will be made explicit. > But even if it is the case, the compiler should report an error. This is not a requirement of the standard but is a long standing regression, relative to g77. Confirmed and marked as "diagnostic" Nous t'en remercions Cordialement Paul program test interface subroutine test1(x,y) real(kind=8), dimension(:) :: x real(kind=8), dimension(:,:) :: y end subroutine end interface real(kind=8), dimension(5) :: test_array real(kind=8), dimension(5,5) :: test_array2 real(kind=8) :: taille write(6,*) 'size=', size(test_array) write(6,*) 'size=', size(test_array2) write(6,*) 'ubound=', ubound(test_array) write(6,*) 'ubound=', ubound(test_array2) call test1(test_array, test_array2) end program > -- pault at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |diagnostic Known to fail|4.1.2 |4.3.0 4.2.0 Last reconfirmed|0000-00-00 00:00:00 |2007-03-26 07:19:26 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31346