-fugly-assumed option enables
the treatment of any array with a final dimension specified as
as an assumed-size array, as if
* had been specified
DIMENSION X(1) is treated as if it
DIMENSION X(*) if
X is listed as
a dummy argument in a preceding
ENTRY statement in the same program unit.
Use an explicit lower bound to avoid this interpretation.
DIMENSION X(1:1) is never treated as if
it had read
DIMENSION X(*) or
DIMENSION X(2-1) affected by this option,
since that kind of expression is unlikely to have been
intended to designate an assumed-size array.
This option is used to prevent warnings being issued about apparent
out-of-bounds reference such as
X(2) = 99.
It also prevents the array from being used in contexts that
disallow assumed-size arrays, such as
In such cases, a diagnostic is generated and the source file is
The construct affected by this option is used only in old code that pre-exists the widespread acceptance of adjustable and assumed-size arrays in the Fortran community.
Note: This option does not affect how
DIMENSION X(1) is
X is listed as a dummy argument only
DIMENSION statement (presumably in
-fugly-assumed has no effect on the
following program unit:
SUBROUTINE X REAL A(1) RETURN ENTRY Y(A) PRINT *, A END