This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/45338] New: Failure on interfacing a function passed as an argument as a custom operator
- From: "sds50 at cam dot ac dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Aug 2010 10:21:51 -0000
- Subject: [Bug fortran/45338] New: Failure on interfacing a function passed as an argument as a custom operator
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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=45338