public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/16941] New: automatic length string as function return value causes internal compiler error
@ 2004-08-09 14:37 paulthomas2 at wanadoo dot fr
  2004-08-09 15:56 ` [Bug fortran/16941] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2004-08-09 14:37 UTC (permalink / raw)
  To: gcc-bugs

!  $ ../bin/gfortran bug7.f90 -o test
!  assertion "sym->ts.cl && sym->ts.cl->length && sym->ts.cl->length->expr_type ==
!  EXPR_CONSTANT" failed: file "../../gcc/gcc/fortran/trans-expr.c", line 1053
!  bug7.f90: In function `MAIN__':
!  bug7.f90:33: 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.

  module t 
    implicit none 
    integer,parameter :: slen = 20
    interface t1
      module procedure mt1 
    end interface 

  contains 

    function mt1(Vector) result (Ans) 
      character (len = *), intent (in) :: Vector 
      character (len = Len(Vector)) :: Ans 
!!!      character (len = slen) :: Ans       !!!works fine
      Ans = Vector
      return
    end function mt1
  end module t

  program ft
    use t
    implicit none
    character (len = slen) :: tsrt
    tsrt = "this is a test"
    print * , t1( tsrt )              !!!note: length of literal is not sent
!!  print * , t1("this is a test")    !!!does not send length to function    
    stop
  end program ft

-- 
           Summary: automatic length string as function return value causes
                    internal compiler error
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: paulthomas2 at wanadoo dot fr
                CC: bdavis at gcc dot gnu dot org,gcc-bugs at gcc dot gnu
                    dot org


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


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

* [Bug fortran/16941] automatic length string as function return value causes internal compiler error
  2004-08-09 14:37 [Bug fortran/16941] New: automatic length string as function return value causes internal compiler error paulthomas2 at wanadoo dot fr
@ 2004-08-09 15:56 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-09 15:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-09 15:56 -------


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

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


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


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

end of thread, other threads:[~2004-08-09 15:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-09 14:37 [Bug fortran/16941] New: automatic length string as function return value causes internal compiler error paulthomas2 at wanadoo dot fr
2004-08-09 15:56 ` [Bug fortran/16941] " 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).