This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/19574] specification expression failure
- From: "paulthomas2 at wanadoo dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jan 2005 10:57:15 -0000
- Subject: [Bug fortran/19574] specification expression failure
- References: <20050122114717.19574.coudert@clipper.ens.fr>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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