*ping*
On 06/28/2012 09:34 AM, Tobias Burnus wrote:
This patch generates inline code for C_F_POINTER with an array
argument. One reason is that GCC didn't handle SHAPE= arguments which
were noncontiguous.
Actually, I just messed up my test case and didn't properly read the
libgfortran/intrinsics/iso_c_binding.c file. The current library version
does support noncontiguous shapes. However, for other reasons - such as
the one below - I still would like to commit the patch; and for review
purpose I also would like to include it now and not together with the
branch.
However, the real motivation is the fortran-dev branch with the new
array-descriptor: C_F_POINTER needs then to set the stride multiplier,
but as it doesn't know the size of a single element, one had either to
pass the value or handle it partially in the front end. Hence, doing
it all in the front-end was simpler. The C_F_Pointer issue is the main
cause for failing test cases on the branch, though several other
issues remain.
Build and regtested on x86-64-linux-
OK for the trunk?
* * *
If you wonder why I had some problems before:
http://gcc.gnu.org/ml/fortran/2012-04/msg00115.html
The reason is that I called pushlevel() twice for "body":
+ gfc_start_block (&body);
+ gfc_start_scalarized_body (&loop, &body);
I removed the first one - and now it works. (Well, there were also
some other issues in the patch, which are now fixed.)
Tobias
PS: After committal, I will update the patch for the branch; let's see
how many failures will remain on the branch.
PPS: The offset handling in gfortran is really complicated. I wonder
whether we have to (or at least should) change it for the new array
descriptor.