This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug fortran/32732] [Bind C] Character scalars are passed as arrays


Hi Steve,


Steve Ellcey wrote:
> OK, I tried this in 32 and 64 bit modes.  (In 32 bit mode I had to
> change the type of size (in printf) to make the Fortran program
> compile.)  The only difference I see is with complex types.  In 32 or 64
> bit mode I get:
>
> complex float: sizeof = 8, kind = 4
> complex double: sizeof = 8, kind = 8
> complex long double: sizeof = 8, kind = 16
>   
As Angelo already found out: There is a typo: I create a default-kind
(sizeof()=8) complex variable with an imaginary part of 4, 8 or 16
instead of a kind=4,8,16 variable; it must be cmplx(0.0, 0.0,
c_*_complex)  [extra ",0.0"].

> Everthing else looked OK
At least something we can rule out :-)
Looking at the gcc-testresults it also fails on sparc-sun-solaris2.10
and one some but not all powerpc64-unknown-linux-gnu.

(Janis wrote: "a quick look showed that it fails on both SLES9, where my
gcc has 64-bit long double, and on SLES10, where long double is 128 bits.".)

Does value_6.f03 fail as well? On the other systems it does and it might
be related.

> I see the same problem (if it is a problem) on x86_64, so this is not an IA64 or HP-UX specific issue.
>   
This is x86-64 HP-UX or some (which?) Linux?

The problem is: I don't see it on x86-64 with openSUSE Factory (with
neither -m32 nor -m64) and not all powerpc64-unknown-linux-gnu are
affected if one believes the posted gcc test-results.

> I will look more into the char issue and see if I can get some more data on what is happening.
>   
Thanks and good look. These are all "abort()" failures and no
segmentation faults, are they?

Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]