public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/45338]  New: Failure on interfacing a function passed as an argument as a custom operator
@ 2010-08-19 10:22 sds50 at cam dot ac dot uk
  2010-08-19 13:09 ` [Bug fortran/45338] " kargl at gcc dot gnu dot org
  2010-08-19 14:11 ` burnus at gcc dot gnu dot org
  0 siblings, 2 replies; 8+ messages in thread
From: sds50 at cam dot ac dot uk @ 2010-08-19 10:22 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-01-02 21:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-45338-4@http.gcc.gnu.org/bugzilla/>
2010-12-29 22:56 ` [Bug fortran/45338] Failure on interfacing a function passed as an argument as a custom operator tkoenig at gcc dot gnu.org
2010-12-30 16:34 ` tkoenig at gcc dot gnu.org
2010-12-31 11:20 ` tkoenig at gcc dot gnu.org
2010-12-31 11:35 ` tkoenig at gcc dot gnu.org
2011-01-02 21:58 ` tkoenig at gcc dot gnu.org
2011-01-02 21:59 ` tkoenig at gcc dot gnu.org
2010-08-19 10:22 [Bug fortran/45338] New: " sds50 at cam dot ac dot uk
2010-08-19 13:09 ` [Bug fortran/45338] " kargl at gcc dot gnu dot org
2010-08-19 14:11 ` burnus at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).