From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19595 invoked by alias); 8 May 2009 14:09:58 -0000 Received: (qmail 19543 invoked by uid 48); 8 May 2009 14:09:44 -0000 Date: Fri, 08 May 2009 14:09:00 -0000 Message-ID: <20090508140944.19542.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/40011] Problems with -fwhole-file In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dominiq at lps dot ens dot fr" 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: 2009-05/txt/msg00674.txt.bz2 ------- Comment #17 from dominiq at lps dot ens dot fr 2009-05-08 14:09 ------- Thanks to the second program in http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/c6621b97f448b516# I think I have found a false positive for -fwhole-file (unpatched): Implicit None Interface Subroutine sub( a, b, c ) Implicit None Integer, Intent( In ) :: a Integer, Intent( In ) :: b Integer, Intent( In ), Optional :: c End Subroutine sub End Interface call sub(1,2) call sub(1,2,3) end subroutine sub(i,j,k) Implicit None Integer, Intent( In ) :: i Integer, Intent( In ) :: j Integer, Intent( In ), Optional :: k intrinsic present write(*,*)' 3 presence flag ',present(k) write(*,*)' 1st arg ',i write(*,*)' 2nd arg ',j if (present(k)) then write(*,*)' 3rd arg ',k else write(*,*)' 3rd arg is absent' endif return end [ibook-dhum] f90/bug% gfc -fwhole-file no_interface_1.f90 no_interface_1.f90:10.24: call sub(1,2) 1 Error: Unexpected alternate return spec in subroutine call at (1) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011