Re: gfortran on 64-bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey you seem to have fallen asleep on the send key there!

You need to divide and conquer:  The way I would attack this problem is to:

a) start with one line and compile that.  E.g. "double precision d" (simple
program, eh)? Then compile and run that.  Then add your next line,
assignment to zero, compile and run that.  At least that will tell you which
line is causing the problem.

b) Try compiling your code on another platform with gcc, if you've got
access to another machine.  Does it cause the same problem - perhaps this is
a machine specific problem.  If it still causes a problem then:

c)  Compile using a different fortran compiler.

Having done all that you'll be in a much better position to understand the
problem you're facing.

Cheers,
David.


----- Original Message -----
From: "Roger Ghanem" <ghanem@xxxxxxxxxxxxx>
To: <gcc-help@xxxxxxxxxxx>
Sent: Friday, November 18, 2005 5:07 PM
Subject: gfortran on 64-bit


> I am having some difficulties writing double precision variables using
gfortran in 64-bit mode:
> source code is
>
>       double precision d
>       d=0.
>       write(0,*) d
>       end
>
> $ /usr/local/usr/bin/gfortran-4.0 -m64 -o pmain2
pmain2.f -L/usr/local/usr/lib
> $ ./pmain2
> Illegal instruction
>
> If I define d to be integer, then I am able to print it with no problem.
>
> Configuration for this gfortran:
>
> $ /usr/local/usr/bin/gfortran-4.0 -v
> Using built-in specs.
> Target: powerpc-apple-darwin8
> Configured with:
/Build/apple/gcc/build/obj/src/configure --disable-checking -enable-werror -
-prefix=/usr --mandir=/share/
> man --enable-languages=c,objc,c+
>
+,obj-c++,f95 --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-in
clude-dir=/include/c++/4.0.0 --build=powerpc-
> apple-darwin8 --host=powerpc-apple-
> darwin8 --target=powerpc-apple-darwin8
> Thread model: posix
> gcc version 4.0.1 (Apple Computer, Inc. build 5224)
>
> Thank you for your help
> Roger Ghanem
>
>
> Roger Ghanem
> 254C Kaprielian Hall
> University of Southern California
> Los Angeles, CA 90089
> Tel:  213 740 9528
> Fax: 213 740 2037
>
>


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux