I am porting legacy code that have
structure aaa integer a1 real a2 C ... end structure structure /aaa/ bbb(100) common /ccc/ bbb
so an array bbb of structures aaa is placed into a common block ccc and wish this portable across Win/UX main fortran compilers.
type aaa integer a1 real a2 C ... end type type (aaa) bbb(100) common /ccc/ bbb save /ccc/
however I cannot compile common and save statements on this code. Please, advice how to place said array of structures into common block and be sure that it is statically allocated and remain in memory?
what errors are you seeing? This compiled for me on Windows.
By the way, the SAVE is redundant; COMMON is already SAVE by definition.
A common block automatically has "save" status I do not think your SAVE is valid Fortran. If you are modernising why not share the data using a module rather than a common block.
The SAVE of a common block is perfectly standard, though as noted, unnecessary. In some earlier Fortran standards you might have needed it if there were no active procedures that declared that common.