public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/19574] New: specification expression failure
@ 2005-01-22 11:49 coudert at clipper dot ens dot fr
  2005-01-25 10:57 ` [Bug fortran/19574] " paulthomas2 at wanadoo dot fr
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: coudert at clipper dot ens dot fr @ 2005-01-22 11:49 UTC (permalink / raw)
  To: gcc-bugs

The following code (from
http://home.comcast.net/~kmbtib/gfortran_bugs/REF_JVB_GFTN_005.html) fails in
the following way (on i686-mingw and powerpc-apple-darwin):

---------------------------------
module funcs
   implicit none
   contains
      function f(x)
         character(*), intent(in) :: x
         integer f(len(x))
         integer i

!         do i=1,len(x)
!           f(i) = 0
!         end do
      end function f
end module funcs

program spec_expr_test
   use funcs
   implicit none

   write(*,*) size(f('test'))
end program spec_expr_test
---------------------------------

$ gfortran reduced_spec.f90 && ./a.out 
reduced_spec.f90: In function 'f':
reduced_spec.f90:4: warning: Function does not return a value
At line 19 of file reduced_spec.f90
Fortran runtime error: Internal: Possible double free of temporary.


If you uncomment the three lines in the code above, you get a runtime segfault
(on powerpc-apple-darwin):

$ gfortran reduced_spec.f90 && ./a.out
zsh: bus error  ./a.out


I don't know if these two issues are related, but I post them both in one PR
just in case they can be debuggued altogether.

-- 
           Summary: specification expression failure
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: coudert at clipper dot ens dot fr
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2006-01-02  7:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-19574-10259@http.gcc.gnu.org/bugzilla/>
2005-12-15 14:50 ` [Bug fortran/19574] specification expression failure paul dot richard dot thomas at cea dot fr
2006-01-02  7:16 ` pinskia at gcc dot gnu dot org
2005-01-22 11:49 [Bug fortran/19574] New: " coudert at clipper dot ens dot fr
2005-01-25 10:57 ` [Bug fortran/19574] " paulthomas2 at wanadoo dot fr
2005-06-06  0:33 ` pinskia at gcc dot gnu dot org
2005-06-06  0:34 ` pinskia at gcc dot gnu dot org
2005-06-13  3:28 ` pinskia at gcc dot gnu dot org
2005-09-18  5:42 ` 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).