public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/16608] New: gfortran internal compiler error on legal code
@ 2004-07-17 19:07 anlauf at hep dot tu-darmstadt dot de
  2004-07-17 19:16 ` [Bug fortran/16608] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: anlauf at hep dot tu-darmstadt dot de @ 2004-07-17 19:07 UTC (permalink / raw)
  To: gcc-bugs

The attached Fortran 95 conforming code gives an ICE with gfortran:

% gfortran -c gfortran-bug5.f90 
f951: ../../gcc/gcc/fortran/trans-decl.c:411: gfc_finish_var_decl: Assertion
`current_function_decl == (tree) ((void *)0)' failed.
gfortran-bug5.f90: In function `copy_s':
gfortran-bug5.f90:31: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

gfortran-bug5.f90:
-------------8<---------------> cut here <--------------8<--------------
module bug5

  implicit none

  type string
     private
     integer                 :: len = 0
     character, pointer      :: chars(:) => null()
  end type string

contains

  pure function len_s(s)

    type(string), intent(in)  :: s
    integer                   :: len_s

    len_s = s%len

  end function len_s

  ! --

  function copy_s(s)

    type(string), intent(in)  :: s
    character(len_s(s))       :: copy_s
    integer                   :: i

    do i = 1,len_s(s)
       copy_s(i:i) = s%chars(i)
    end do

  end function copy_s

end module bug5
-------------8<---------------> cut here <--------------8<--------------

-- 
           Summary: gfortran internal compiler error on legal code
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anlauf at hep dot tu-darmstadt dot de
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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


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

* [Bug fortran/16608] gfortran internal compiler error on legal code
  2004-07-17 19:07 [Bug fortran/16608] New: gfortran internal compiler error on legal code anlauf at hep dot tu-darmstadt dot de
@ 2004-07-17 19:16 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-17 19:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-17 19:16 -------


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

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


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


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

end of thread, other threads:[~2004-07-17 19:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-17 19:07 [Bug fortran/16608] New: gfortran internal compiler error on legal code anlauf at hep dot tu-darmstadt dot de
2004-07-17 19:16 ` [Bug fortran/16608] " pinskia 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).