troubleshooting Question

Is common allowed in gfortran

Avatar of madmax61
madmax61 asked on
ProgrammingProgramming Languages-Other
11 Comments2 Solutions682 ViewsLast Modified:
I'm converting FORTRAN code from HP-UX FORTRAN over to gfortran on a RedHat Linux system.

I'm having problems with the COMMON statements not behaving the same way as programs coming from the HP system, on the Linux system using gfortran (4.4.?). Once I abandon common and pass the variables as arguments to the subroutines the program gives the correct results.

Does gfortran fully support use of COMMON? Is the behaviour different?
Is it somehow related to the correct or different or more strict use of the SAVE statement in conjunction with COMMON (something I know nothing about)?

p.s Why don't I see the FORTRAN category to post this in, something I did recently? (Admin please add this to FORTRAN if it can be done, it just no longer appears as an option in programming languages for me)

Any help much appreciated.


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros