------- Comment #5 from burnus at gcc dot gnu dot org 2008-01-21 07:41 ------- > Then the resultant C source is > VOID f_(doublecomplex * ret_val, doublereal *a)
Indeed this is f2c (and g77 -ff2c) syntax. > So it seems to me that the current functionality of the gfortran is different > from that of f2c, isn't it? The functionality is not really different (except that gfortran supports much more), but the calling is indeed different. All (most) modern compilers, including gfortran, generate such a prototype: complex double f_ (double *a) > And, I'm wondering why changing the pseudo-size array "a(:)" to the > variable "a" This rings a bell. And indeed the patch for PR 34848 [attachment 14978] fixes this problem (but it causes some other regressions, see PR 34848). (Note that "a(:)" and "a(*)" make a huge difference: For "a(*)" the size/upper bound of the array "a" is unknown and the array is contiguous, while for "a(:)" the bounds and sizes are known and the array might be not contiguous in memory (strides); additionally the interface of the procedure "f" needs then to be known to the caller of "f".) -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- BugsThisDependsOn| |34848 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34868