Divide by zero at compilation time
Jerry DeLisle
jvdelisle@verizon.net
Fri Jun 22 14:57:00 GMT 2007
Alberto Luaces wrote:
> Hello,
>
> I am trying to compile a program made of several files, most of them modules.
> All the files were succesfully built on the Windows Compaq compiler before. I
> am in the process of getting the code to compile in Linux gfortran, fixing
> some non-standard features that the original code had. So far, so good.
>
> However, the compilation of a few files is giving a weird error. It is using
> two modules previously built:
>
> gfortran -c jacob_log_pos.f90
> In file jacob_log_pos.f90:3
>
> USE CONSTANTES
> 1
> Error: Division by zero at (1)
> make: *** [all] Error 1
>
> That module, 'CONSTANTES', is being succesfully used on other files. If I
> comment that line, the same error is issued on the next reference to a
> module.
>
> I am attaching the only 3 files that reflect the problem, 2 modules and the
> file that is giving the error. I am also sending a Makefile to facilitate the
> compilation. If you want to give it a try, you have only to 'make':
>
>> make
> gfortran -c constantes.F90
> gfortran -c jacob_log_MOD.f90
> gfortran -c jacob_log_pos.f90
> In file jacob_log_pos.f90:3
>
> USE CONSTANTES
> 1
> Error: Division by zero at (1)
> make: *** [all] Error 1
>
> I am using gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4), 64bit (amd64). I have
> also tried with gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21),
> this time 32bit and also got the same error.
>
> What do you think about this?
>
> Thank you very much,
>
> Alberto
I have confirmed this problem on gfortran 4.1.1 and 4.2. It does not occur on
4.3, so it looks like it has been fixed.
Jerry
More information about the Fortran
mailing list