This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: Gfortran : fortran 90 not supported


Hi Thomas,

Thanks for your answer.

For the simple program, doing this:

>> gfortran -ff90 hiWorld.f90

I get :
f951: error: unrecognized command line option "-ff90"

As for the complete project, I get a cmake error, tied to the compiler  :
....

-- Check for working Fortran compiler: /usr/bin/gfortran
-- Check for working Fortran compiler: /usr/bin/gfortran  -- broken
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestFortranCompiler.cmake:40
(MESSAGE):
  The Fortran compiler "/usr/bin/gfortran" is not able to compile a simple
  test program.

  It fails with the following output:

   Change Dir: /home/fry/Zurich/addecco_gfortran/FBx/OBJECTS/OgFBxOEz/CMakeFiles/CMakeTmp



  Run Build Command:/usr/bin/make "cmTryCompileExec/fast"

  /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make
  CMakeFiles/cmTryCompileExec.dir/build

  make[1]: se ingresa al directorio
  `/home/fry/Zurich/addecco_gfortran/FBx/OBJECTS/OgFBxOEz/CMakeFiles/CMakeTmp'


  /usr/bin/cmake -E cmake_progress_report
  /home/fry/Zurich/addecco_gfortran/FBx/OBJECTS/OgFBxOEz/CMakeFiles/CMakeTmp/CMakeFiles
  1

  Building Fortran object
  CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.f.o

  /usr/bin/gfortran -o
  CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.f.o -O0
  -fdefault-real-8 -g -ffixed-line-length-none -ffree-line-length-none
  -ffree-form -fimplicit-none -fbacktrace -I/usr/include -I/usr/local/include
  -Wall -pedantic -ff90 -c
  /home/fry/Zurich/addecco_gfortran/FBx/OBJECTS/OgFBxOEz/CMakeFiles/CMakeTmp/testFortranCompiler.f


  f951: error: unrecognized command line option "-ff90"

  make[1]: *** [CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.f.o]
  Error 1

  make[1]: se sale del directorio
  `/home/fry/Zurich/addecco_gfortran/FBx/OBJECTS/OgFBxOEz/CMakeFiles/CMakeTmp'


  make: *** [cmTryCompileExec/fast] Error



Regards,

J.

2014-04-03 17:38 GMT+02:00 Thomas Bodine <bo_dance@yahoo.com>:
> Try this
> gfortran -ff90 yourcode.f
>
> http://gcc.gnu.org/onlinedocs/gcc-3.4.6/g77/Fortran-90.html
>
> Its been about a year, so I'm a little rusty.
>
> #-------------------------------------------------------
> # Thomas Bodine, http://www.tommythegeek.com
> # Dancing to the music life has given me.
> # Skipper S/V Frimi WWP 19 #1029
> On Thursday, April 3, 2014 9:34 AM, Jesús Garicano Mena
> <jesus.garicano.mena@vki.ac.be> wrote:
> Hello,
>
> I want to compile a f90 code with gfortran. I know this code can be
> compiled normally with ifort.
>
> Compiling a simple, single file fortran, will work, i.e.,
>>> gfortran hiWorld.f90 -o hi
>
> However, when I try to compile the serious code, and while the
> compilation of my real  prepares to start I get the following:
> ...
> -- Checking whether /usr/bin/gfortran supports Fortran 90
> -- Checking whether /usr/bin/gfortran supports Fortran 90 -- no
> ...
>
> The compilation stops then, with error messages like this one:
> /home/fry/code_gfortran/FBx/trunk/TYPES/element.f90:99.4:
>
>     SELECT CASE(e%EltType)
>     1
> Error: Unclassifiable statement at (1)
>
>
> Is there a way to force gfortran to support f90? Am I missing some flag?
>
> Thanks in advance, and
>
> Best regards,
>
> J. Garicano
>
>
> P.S.1 The flags used are:
> -fdefault-real-8 -g -ffixed-line-length-none -ffree-line-length-none
> -ffree-form -fimplicit-none -fbacktrace -I/usr/include
> -I/usr/local/include -Wall -std=f95 -pedantic
>
> P.S. 3 This is the output of
>>> gfortran -v
>
> Using built-in specs.
> Target: i486-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Debian
> 4.4.5-8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
> --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
> --program-suffix=-4.4 --enable-shared --enable-multiarch
> --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib
> --without-included-gettext --enable-threads=posix
> --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib
> --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
> --enable-objc-gc --enable-targets=all --with-arch-32=i586
> --with-tune=generic --enable-checking=release --build=i486-linux-gnu
> --host=i486-linux-gnu --target=i486-linux-gnu
> Thread model: posix
> gcc version 4.4.5 (Debian 4.4.5-8)
>
>
>
>
> --
> Jesús Garicano Mena
>
> Ph.D. candidate
>
> Aeronautics and Aerospace Department
>
> von Karman Institute for Fluid Dynamics
>
> Chaussée de Waterloo, 72, Rhode-St-Genèse 1640, Belgium
>
> E-mail: jesus.garicano.mena@vki.ac.be
>
> Phone: +3223599611
>
> Fax: +3223599600
>



-- 
Jesús Garicano Mena

Ph.D. candidate

Aeronautics and Aerospace Department

von Karman Institute for Fluid Dynamics

Chaussée de Waterloo, 72, Rhode-St-Genèse 1640, Belgium

E-mail: jesus.garicano.mena@vki.ac.be

Phone: +3223599611

Fax: +3223599600


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