This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/34848] New: internal compiler error: Segmentation fault/optional arguments


Gfortran version 4.3.0 20080117 (experimental) [trunk revision 131592] (GCC)
gives an ICE on the following program.

$ gfortran -c ia.f90
ia.f90: In function 'doit':
ia.f90:12: internal compiler error: Segmentation fault

---------------------------------------------------------------------------
module krmod
contains
  function doit(genloc,vloc,scheme)
    implicit none
    character(len=6), optional,               intent(in)  :: genloc
    real,    optional, dimension(:), intent(in)  :: vloc
    character(len=2), optional,               intent(out) :: scheme
    real :: doit(100)
    !-------------------------------------------------------------------------!
    if(present(genloc)) then
       doit = tm_doit(genloc=genloc)
       if(present(scheme)) scheme = 'tm'
    else
       doit = tm_doit(vloc=vloc)
       if(present(scheme)) scheme = 'tm'
    endif
    return
  end function doit
  function tm_doit(genloc,vloc)
    implicit none
    character(len=6), optional,               intent(in)  :: genloc
    real,    optional, dimension(:), intent(in)  :: vloc
    real :: tm_doit(100)
    tm_doit = 1.0
  end function tm_doit
end module krmod


-- 
           Summary: internal compiler error: Segmentation fault/optional
                    arguments
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: krefson at googlemail dot com
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]