blank common block in module (mixing f90/f77)

blank common block in module (mixing f90/f77)

we are trying to use some f77 code inside a f90 code.
We put all common blocks in one module and use this module were needed.
This works with most of other compilers but not with Compaq's. The problems seems to come from the presence of the blank common block. Here is an example code and the compilation error...

module commons
implicit integer(n)
common // nwork
end module commons

module test_mod
use commons
implicit none
integer :: a=1
end module test_mod

program test
use test_mod
implicit none

print *,nwork,a

end program test

and the compilation ends with this

f90 test.f90
f90: Severe: test.f90, line 4: **Internal compiler error: segmentation violation
signal raised** Please report this error along with the circumstances in which
it occurred in a Software Problem Report. Note: File and line given may not be
explicit cause of this error.
end module commons
6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You're using a very old compiler version. try a newer one. This works fine in 5.4.


Retired 12/31/2016

Not realy. This error I get with these versions...

> f90 -version
Compaq Fortran X5.4A-1684
Compaq Fortran Compiler X5.4A-1684-46B5P

>uname -sprv
OSF1 V5.1 732 alpha

Sorry - I misread the version.

This seems to be something we broke after 5.4. We'll take a look.


Retired 12/31/2016

Have you got any fix/explanation for this problem?

Explanation: it's a compiler bug. Fix - it's too late to fix it in 5.5, but we'll fix it for any update after that.

The easiest workaround is to give the COMMON a name.


Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today