This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR 78392: ICE in gfc_trans_auto_array_allocation, at fortran/trans-array.c:5979
2016-11-26 17:37 GMT+01:00 Dominique d'Humières <dominiq@lps.ens.fr>:
>
>> Le 26 nov. 2016 à 10:45, Janus Weil <janus@gcc.gnu.org> a écrit :
>>
>> ping!
>>
> The patch is working has expected. Note the removed block has been introduced by Daniel Franke at r126826.
Right, thanks for the reference. I think that commit is plain wrong,
at least the part that says "Specification functions are constant".
One can easily construct a specification function that is not a
compile-time constant. For example, just take the module function
"get_i" in the test case and have it depend on a variable declared in
the module header.
module mytypes
implicit none
integer, save :: i = 13
contains
pure integer function get_i ()
get_i = i
end function
subroutine set_i (j)
integer, intent(in) :: j
i = j
end subroutine
end module
Cheers,
Janus
- References:
- Re: [Patch, Fortran] PR 78392: ICE in gfc_trans_auto_array_allocation, at fortran/trans-array.c:5979
- From: Dominique d'Humières
- Re: [Patch, Fortran] PR 78392: ICE in gfc_trans_auto_array_allocation, at fortran/trans-array.c:5979
- Re: [Patch, Fortran] PR 78392: ICE in gfc_trans_auto_array_allocation, at fortran/trans-array.c:5979
- Re: [Patch, Fortran] PR 78392: ICE in gfc_trans_auto_array_allocation, at fortran/trans-array.c:5979
- Re: [Patch, Fortran] PR 78392: ICE in gfc_trans_auto_array_allocation, at fortran/trans-array.c:5979
- From: Dominique d'Humières