[Bug fortran/45624] Division by zero compiler error

2010-09-10 Thread leftynm at umich dot edu
--- Comment #5 from leftynm at umich dot edu 2010-09-10 16:06 --- Thanks guys. Yeah, I guess my use of PARAMETER wasn't consistent with how it works. I was using it to set a variable such that it cannot be changed. I found a work around though lets me keep it as a PARAMETER, but

[Bug fortran/45624] Division by zero compiler error

2010-09-09 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2010-09-09 22:19 --- PARAMETER are special as it is an exact replacement for those variables. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/45624] Division by zero compiler error

2010-09-09 Thread kargl at gcc dot gnu dot org
--- Comment #2 from kargl at gcc dot gnu dot org 2010-09-09 22:25 --- There is no way to fix this problem unless you would like +inf along the diagonal. gfortran will constant fold 1./alpha if alpha has the parameter attribute. After all, this attribute tells the compiler that alpha

[Bug fortran/45624] Division by zero compiler error

2010-09-09 Thread leftynm at umich dot edu
--- Comment #3 from leftynm at umich dot edu 2010-09-09 22:56 --- Ok, if the fact that the variable is a parameter causes this error, I'll have to adjust the rest of my code accordingly to work around this problem. It seems like there should be a better way to fix this, since I want to

[Bug fortran/45624] Division by zero compiler error

2010-09-09 Thread dominiq at lps dot ens dot fr
--- Comment #4 from dominiq at lps dot ens dot fr 2010-09-09 23:20 --- You can use the option -fno-range-check. However, the code itself and the sentence since I want to protect this variable in comment #3 let me suspect that you have not understood what PARAMETER is for: a variable