This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Bug fortran/32732] [Bind C] Character scalars are passed as arrays
Hi,
Thanks Angelo for testing. I'm mostly interested in platforms where ISO
Bind C fails (such as ia64 HP-UX or some(!) powerpc64-unknown-linux-gnu)
and I assume it works on i686 Linux. If it does not I am highly
interested in knowing what fails.
In any case, you found some bugs in my test case; besides the
integer-kind problem the following real programming error:
Angelo Graziosi wrote:
> complex float: sizeof = 8, kind = 4
> complex double: sizeof = 8, kind = 8
> complex long double: sizeof = 8, kind = 10
>
And another mistake by me; it should be:
call printf("complex float", sizeof(cmplx(0.0, 0.0, c_float_complex)), c_float_complex);
call printf("complex double", sizeof(cmplx(0.0, 0.0, c_double_complex)), c_double_complex);
call printf("complex long double", sizeof(cmplx(0.0, 0.0, c_long_double_complex)), c_long_double_complex);
I was passing c_*_complex not as KIND but at imaginary number to
"cmplx"; thanks for catching this.
Tobias