This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/36167] ICE in gfc_conv_descriptor_dimension, at fortran/trans-array.c:242



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]