Currently, gfc_get_symbol_decl only deals with -fwhole-file issues of module
variable (FL_VARIABLE( but not with array-valued (or non-intrinsic-type)
parameters (FL_PARAMETER).

Thus, for the following program, multiple UIDs will be generated for the
program below:

module m
  integer, parameter :: para(3) = [1, 2, 3]
end module m

subroutine one
  use m
  i = para(1)
end subroutine one

subroutine two
  use m
  j = para(1)
end subroutine two

-fdump-tree-original-uid shows:

  extern integer(kind=4)D.8 paraD.1556[3];
  extern integer(kind=4)D.8 paraD.1561[3];

           Summary: Multiple DECL for array valued PARAMETER (-fwhole-file
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org

Reply via email to