------- Comment #4 from ebotcazou at gcc dot gnu dot org 2008-11-26 08:05 ------- > There is no error on link stage, but gfortran tries to link program with 32 > bits libraries, not with 64 bits one even I force -m64.
Not quite. The binary is correctly linked against 64-bit libraries, but the -R path is not set by default. You need to set it or set LD_LIBRARY_PATH: ([EMAIL PROTECTED]) ~ $ gfortran -m64 test.f90 ([EMAIL PROTECTED]) ~ $ ./a.out ld.so.1: ./a.out: fatal: /nile.build/botcazou/gcc-head/install_sparc/lib/libgfortran.so.3: wrong ELF class: ELFCLASS32 Killed ([EMAIL PROTECTED]) ~ $ gfortran -m64 test.f90 -Wl,-R,/nile.build/botcazou/gcc-head/install_sparc/lib/sparcv9 ([EMAIL PROTECTED]) ~ $ ./a.out Hello, world ([EMAIL PROTECTED]) ~ $ gfortran -m64 test.f90 ([EMAIL PROTECTED]) ~ $ ./a.out ld.so.1: ./a.out: fatal: /nile.build/botcazou/gcc-head/install_sparc/lib/libgfortran.so.3: wrong ELF class: ELFCLASS32 Killed ([EMAIL PROTECTED]) ~ $ export LD_LIBRARY_PATH=/nile.build/botcazou/gcc-head/install_sparc/lib/sparcv9 ([EMAIL PROTECTED]) ~ $ ./a.out Hello, world -- ebotcazou at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38268