public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/45339]  New: Failure on interfacing a function passed as an argument as a custom operator
@ 2010-08-19 10:23 sds50 at cam dot ac dot uk
  2010-08-19 13:08 ` [Bug fortran/45339] " kargl at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: sds50 at cam dot ac dot uk @ 2010-08-19 10:23 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=45339


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

* [Bug fortran/45339] Failure on interfacing a function passed as an argument as a custom operator
  2010-08-19 10:23 [Bug fortran/45339] New: Failure on interfacing a function passed as an argument as a custom operator sds50 at cam dot ac dot uk
@ 2010-08-19 13:08 ` kargl at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-08-19 13:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from kargl at gcc dot gnu dot org  2010-08-19 13:08 -------


*** This bug has been marked as a duplicate of 45338 ***


-- 

kargl at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45339


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

end of thread, other threads:[~2010-08-19 13:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-19 10:23 [Bug fortran/45339] New: Failure on interfacing a function passed as an argument as a custom operator sds50 at cam dot ac dot uk
2010-08-19 13:08 ` [Bug fortran/45339] " kargl 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).