[Bug fortran/49802] [F03] [F08] Wrong code with VALUE, VALUE with arrays/DIMENSION

juergen.reuter at desy dot de gcc-bugzilla@gcc.gnu.org
Sun Oct 28 17:44:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49802

Jürgen Reuter <juergen.reuter at desy dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |juergen.reuter at desy dot de

--- Comment #9 from Jürgen Reuter <juergen.reuter at desy dot de> ---
(In reply to Dominique d'Humieres from comment #8)
> > 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

This ICE is no longer present in trunk.


More information about the Gcc-bugs mailing list