The problem is actually with MacPorts 4.3.2. A little more accurately, this is NOT an actual bug. The problem is that the behavior you are seeing is allowed under the Fortran standard -- that's why selected_int_kind exists in the first place.
I had to issue a patch for a piece of software that used selected_real_kind(), but assumed that it would always return 8 as used. From all the searching I did, I found that this behavior was perfectly within the Fortran standard, and that we had to become compliant with it. My suggestion is to avoid roll-your-own precision to avoid problems like this. If you need to use it, make sure you always use the enquiry intrinsics (selected_real_kind and selected_int_kind), and never assume it will take a particular value. To reiterate, this behavior ONLY arose when I built all my ports with Xcode 4.3.2, and never with older Xcodes (that is, if I built gcc4x with Xcode 4.3.2, it would happen regardless of which FCC I built). I agree the behavior differs in my experiences with Linux, but there are other OSes and compilers that behave differently as well (or so I read). HTH, Jason -- Jason M. Swails Quantum Theory Project, University of Florida Ph.D. Candidate 352-392-4032 On Apr 26, 2012, at 11:23 PM, Victor Eijkhout <[email protected]> wrote: > > On Apr 26, 2012, at 9:58 PM, Ryan Schmidt wrote: > >> Test with gcc47 and gcc48 > > I did, at least version 4.8. But the problem is that it behaves differently > with MacPorts than the gcc distribution on Linux, so the package maintainer > for gcc might know more about it. > > Victor. > _______________________________________________ > macports-users mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macports-users _______________________________________________ macports-users mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
