From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5468 invoked by alias); 24 May 2010 10:44:44 -0000 Received: (qmail 5375 invoked by uid 48); 24 May 2010 10:44:26 -0000 Date: Mon, 24 May 2010 10:44:00 -0000 Message-ID: <20100524104426.5374.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/36553] Missing interface not detected in call to same file function In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dfranke 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: 2010-05/txt/msg02726.txt.bz2 ------- Comment #13 from dfranke at gcc dot gnu dot org 2010-05-24 10:44 ------- (In reply to comment #12) > With -fwhole-file, we get for the short testcase: > > ../pr36553/pr36553.f90:2.9: > > print *, f( (/ 0.0, 1.0/) ) > 1 > Error: The reference to function 'f' at (1) either needs an explicit > INTERFACE or the rank is incorrect Argh! How did I miss that? Ok, if the array valued result is removed, it goes again unnoticed: real :: f print *, f( (/ 0.0, 1.0/) ) end function f(x) real, intent(in) :: x(:) ! assumed shape requires explicit interface in caller real :: f f = sum(x) end function -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36553