This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36167] ICE in gfc_conv_descriptor_dimension, at fortran/trans-array.c:242
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 May 2008 16:20:20 -0000
- Subject: [Bug fortran/36167] ICE in gfc_conv_descriptor_dimension, at fortran/trans-array.c:242
- References: <bug-36167-16157@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pault at gcc dot gnu dot org 2008-05-17 16:20 -------
(In reply to comment #1)
> Created an attachment (id=15589)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15589&action=view) [edit]
> Very small code example
>
Frank,
The problem arises because of the declaration of 'u' in 'overlap_1. gfortran
declares automatic arrays to be array types in TREE-SSA. For some reason, the
interface code in the function code is barfing when it tries to set the
dimensions of the result. The interface is assuming that there is a descriptor
available for 'u' and this generates the ICE. I will investigate because it is
legal code. In the mean time, a workaround is to declare 'u' as assumed shape,
thusly:
real, intent(in), dimension(:,:,:) :: u
This forces the array to be represented as descriptor type and does not lose
anything from your code. It also is a bit easier on the eye:)
Thanks for the report.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36167