This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35765] return type of complex functions not C compatible
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Mar 2008 21:18:17 -0000
- Subject: [Bug fortran/35765] return type of complex functions not C compatible
- References: <bug-35765-12211@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from burnus at gcc dot gnu dot org 2008-03-30 21:18 -------
> Not all. I gave two counter examples: pvf and ifort.
Well at least ifort 9.1, 10.0 and 10.1 on Linux do not use the f2c calling
convention. Neither does NAG f95. But I agree that _ vs __ and different
calling convention make things more difficult, which is why I'm glad that we
have BIND(C).
However, besides the problem you mentioned with unmodifiable libraries there is
the additional problem that many compilers do not support BIND(C), yet.
> gcc makes a difference between built in types and structs with respect to
> function return values (depends on the platform and the
> -fpcc-struct-return/-freg-struct-return switches).
Ugh, this explains why on PPC(?) the initial VALUE gfortran testsuite test
(which used a struct instead of _Complex on the C side) failed; on x86/x86-64
it worked. I thought it was only about alignment.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35765