[Bug fortran/49802] [F2003, F2008] Wrong code with VALUE, F2008: VALUE with arrays/DIMENSION
dominiq at lps dot ens.fr
gcc-bugzilla@gcc.gnu.org
Sun Jul 20 18:41:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49802
--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> I also confirm that compiling the test in comment #5 gives an ICE
I get the same ICE with the following code
call pr53876
end
subroutine pr53876
IMPLICIT NONE
TYPE :: individual
integer :: icomp ! Add an extra component to test offset
REAL, DIMENSION(:), ALLOCATABLE :: genes
END TYPE
CLASS(individual), DIMENSION(:), ALLOCATABLE :: indv, indv1
allocate (indv(2), source = [individual(1, [99,999]), &
individual(2, [999,9999])])
! allocate (indv1(2), source = [indv(1),indv(2)])
print *, fun([indv(1),indv(2)])
contains
elemental function fun(x) result(res)
integer :: res
class(individual), intent(in) :: x
res = x%genes(1)
end
END
More information about the Gcc-bugs
mailing list