This is the mail archive of the gcc-patches@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]

Re: [Patch, Fortran] PR 44207: ICE with ALLOCATABLE components and SOURCE


On Fri, Jun 11, 2010 at 01:03:47AM +0200, Janus Weil wrote:
> 
> Btw, both 'conformable_arrays' and 'compare_shapes' were implemented
> by Steve (the first in r151023, the second in r95945), so maybe he can
> give some advice here?
> 

Well, r95945 is more than 5 years ago while r151023 is 
almost a year old.  I can't recall the details but reading
the diffs

svn diff -r 95944:95945 . | more
svn diff -r 151022:151023 . | more

shows that compare_shapes(*op1, *op2) is only called if
it is known the op1->rank == op2->rank.  Additionally,
this function assumes the arrays op1->shape[] and op2->shape[]
are already populated with the extent of each dimension.

For conformable_arrays(*e1, *e2), the ranks of the expression
may be different (which is the first check within the function).
In additional, if the ranks match, this function computes the
extent for e2.  Here, e1->shape[] is already propulated.

> > For a start, I wanted to get conformable_arrays fixed. One could still
> > think about merging them afterwards.
> 
> Due to the complications described above it is not trivial to merge
> both functions, and I would prefer to just fix the ICE with the patch
> I proposed earlier in this thread. Is that ok?

As far as I'm concerned, "Yes, let's fix the ICE".

-- 
Steve


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