From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26284 invoked by alias); 18 Jan 2009 21:21:36 -0000 Received: (qmail 26148 invoked by uid 48); 18 Jan 2009 21:21:26 -0000 Date: Sun, 18 Jan 2009 21:21:00 -0000 Subject: [Bug fortran/38907] New: ICE when contained function has same name as module function and used in expression X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dick dot hendrickson at gmail 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: 2009-01/txt/msg02039.txt.bz2 The following program gives an internal compiler error. If the line RDA = -1 is commented out, there is a different ICE. If the unary + before the function reference in the assignment to RDA(1,2) is removed the ICE goes away. Dick Hendrickson module sa0054_stuff ! fails on Windows XP ! gcc version 4.4.0 20081219 (experimental) [trunk revision 142842] (GCC) contains PURE FUNCTION S_REAL_SUM_I (A,B) REAL :: S_REAL_SUM_I REAL, INTENT(IN), OPTIONAL :: A,B X = 0 S_REAL_SUM_I = X END FUNCTION S_REAL_SUM_I SUBROUTINE SA0054(RDA, NF10,nf1,nf2,nf3,nf4) REAL RDA(NF10,NF10) RDA = -1 !changes ICE if commented out RDA(1,2) = + S_REAL_SUM_I(1.0,2.0) ! RDA(1,2) = S_REAL_SUM_I(1.0,2.0) !This one works CONTAINS PURE FUNCTION S_REAL_SUM_I (A,B) REAL :: S_REAL_SUM_I REAL, INTENT(IN), OPTIONAL :: A,B S_REAL_SUM_I = 0 END FUNCTION S_REAL_SUM_I END SUBROUTINE end module sa0054_stuff With RDA = -1 C:\gfortran>gfortran try_sa0054.f f951.exe: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. With RDA = -1 commented out C:\gfortran>gfortran try_sa0054.f f951.exe: internal compiler error: in check_host_association, at fortran/resolve .c:4369 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. -- Summary: ICE when contained function has same name as module function and used in expression Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dick dot hendrickson at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38907