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/19574] specification expression failure


------- Additional Comments From paulthomas2 at wanadoo dot fr  2005-01-25 10:57 -------
The segmentation fault seems to me to have the same source as PR19561 - 
temporaries are not being allocated/assigned properly.

This does the first wriet OK and then seg faults on the second:

! { dg-do run }
module funcs
   implicit none
   contains
      function f (x)
         character(*), intent(in) :: x
         integer f(len(x))
	 f = 0
      end function f
end module funcs
program spec_expr_test
   use funcs
   implicit none
   integer, dimension(10)  :: i
   i(1:5) = f ('test')
   write (*,*) i(1:5)
   write (*,*) f('untest')
end program spec_expr_test
! { dg-error "Segmentation fault (core dumped)" }


-- 


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


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