[Bug fortran/46339] [4.3/4.4/4.5/4.6 Regression] ICE (segfault) in gfc_trans_pointer_assignment
paul.richard.thomas at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Nov 16 15:11:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46339
--- Comment #18 from paul.richard.thomas at gmail dot com <paul.richard.thomas at gmail dot com> 2010-11-16 15:04:39 UTC ---
Dear Tobias,
> If my understanding is correct, we can either try to extend the 'span' hack to
> make it work for more cases - or we defer it to the array descriptor updated
> and possibly error out when it is known that the hack does not work.
Your understanding is correct. The case at point here should be
easily fixed. It is a question of getting the span right by obtaining
the element size of the array. ie. you need to go through the
references until a REF_ARRAY is found and to take theelement size of
that array.
Passing these beasts to pointer formal arguments is a tad awkward.
The only way that I know to extend the current mechanism is to pass
'span' variable in the same way as character variables; only when the
formal argument is a pointer, however. This would mean that all dummy
pointers would have to have a 'span' associated with them.
Note that we could do array descriptor reform in two steps; first add
all the extra fields and then, possibly, change the dimension
structure. I say possibly about the latter because I am not convinced
that it is necessary and my first attempts this summer indicated what
a hard job it will be. We could get an SoC student going on it?
Cheers
Paul
More information about the Gcc-bugs
mailing list