This FORTRAN code shouldn't compile. Is there a reason why it does?
问题 The following code compiles, but I do not think that it should. As you can see, the output is garbage. This is a minimal failing example of something that bit me hard in a large project I work on. My question is - why does the compiler not complain? Is this a compiler limitation, or is this somehow "expected behaviour", and I've missed something? I'm using gfortran 4.6.3. module dataModule integer :: datum1 = int(1) integer :: datum2 = int(2) end module dataModule program moduleTest use