From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9828 invoked by alias); 19 Aug 2010 10:23:41 -0000 Received: (qmail 9781 invoked by uid 48); 19 Aug 2010 10:23:30 -0000 Date: Thu, 19 Aug 2010 10:23:00 -0000 Subject: [Bug fortran/45339] New: Failure on interfacing a function passed as an argument as a custom operator X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "sds50 at cam dot ac dot uk" 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-08/txt/msg01554.txt.bz2 In the testcase below, compiled with: gfortran -c test.f90 gfortran suffers an internal compiler error: internal compiler error: in gfc_gen_symbol_decl, at fortran/trans-decl.c:893 If the commenting on the marked line is removed, then the code compiles fine. I have tested this case with versions 4.3.2, 4.4.1 and 4.6 (experimental, from svn trunk last night). It works correctly using ifort, PGI and pathscale compilers. --------------------------------------- module test_mod implicit none contains subroutine test_fn (cmp) interface operator(.myop.) pure function cmp (a, b) result(ret) integer, intent(in) :: a, b logical ret end function end interface integer :: a, b !print*, cmp(a, b) ! If this line is commented out, gfortran has an ! internal compiler error print*, a .myop. b end subroutine end module -- Summary: Failure on interfacing a function passed as an argument as a custom operator Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sds50 at cam dot ac dot uk http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45339