Skip to content
Prev 7917 / 15075 Next

Which gcc version on mac os?

On 10-04-2011, at 10:42, Christophe Dutang wrote:

            
Looking at your Fortran code, I think you have just been  lucky.
HQNORM is not declared with a type in the routine you are using it. Implicit declaration most likely implies it is real (real*4). But later on it is typed as double precision. Asking for trouble.
Temp01 is not declared and thus implicitly real*4 (most likely).
see remark above about hqnorm. Same problem.
gcc-4.2.1 comes with Xcode. And gfortran must be obtained from http://r.research.att.com/tools/
and should match the Xcode version. That's all.

But looking at that page I don't see a gfortran available for Apple gcc 5666 (from Xcode 3.2.6?).
I am using gfortran 5664 with Xcode 3.2.5.

Simon knows more about this.
Yes.
Declare ALL variables. With implicit fortran typing you can run into all sorts of trouble.

Test compile your Fortran with

gfortran -c -fsyntax-only -fimplicit-none LowDiscrepancy.f

You'll get a shock.
Always at least test with -fimplicit-none.

best regards

Berend