From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14629 invoked by alias); 18 Jan 2008 11:36:17 -0000 Received: (qmail 14159 invoked by uid 48); 18 Jan 2008 11:35:34 -0000 Date: Fri, 18 Jan 2008 11:57:00 -0000 Subject: [Bug fortran/34848] New: internal compiler error: Segmentation fault/optional arguments X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "krefson at googlemail dot com" 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-01/txt/msg01914.txt.bz2 Gfortran version 4.3.0 20080117 (experimental) [trunk revision 131592] (GCC) gives an ICE on the following program. $ gfortran -c ia.f90 ia.f90: In function 'doit': ia.f90:12: internal compiler error: Segmentation fault --------------------------------------------------------------------------- module krmod contains function doit(genloc,vloc,scheme) implicit none character(len=6), optional, intent(in) :: genloc real, optional, dimension(:), intent(in) :: vloc character(len=2), optional, intent(out) :: scheme real :: doit(100) !-------------------------------------------------------------------------! if(present(genloc)) then doit = tm_doit(genloc=genloc) if(present(scheme)) scheme = 'tm' else doit = tm_doit(vloc=vloc) if(present(scheme)) scheme = 'tm' endif return end function doit function tm_doit(genloc,vloc) implicit none character(len=6), optional, intent(in) :: genloc real, optional, dimension(:), intent(in) :: vloc real :: tm_doit(100) tm_doit = 1.0 end function tm_doit end module krmod -- Summary: internal compiler error: Segmentation fault/optional arguments Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: krefson at googlemail dot com GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34848