Commit 4ed5664e by Tobias Burnus Committed by Tobias Burnus

re PR fortran/45756 (Multiple DECL for array valued PARAMETER (-fwhole-file issue))

2010-09-28  Tobias Burnus  <burnus@net-b.de>

        PR fortran/45756
        * trans-decl.c (gfc_get_symbol_decl): Use gsym for decl of
        module parameters.

From-SVN: r164686
parent 2268453b
2010-09-28 Tobias Burnus <burnus@net-b.de>
PR fortran/45756
* trans-decl.c (gfc_get_symbol_decl): Use gsym for decl of
module parameters.
2010-09-27 Tobias Burnus <burnus@net-b.de>
PR fortran/40569
......
......@@ -1133,11 +1133,18 @@ gfc_get_symbol_decl (gfc_symbol * sym)
if (sym->backend_decl)
return sym->backend_decl;
/* Special case for array-valued named constants from intrinsic
procedures; those are inlined. */
if (sym->attr.use_assoc && sym->from_intmod
&& sym->attr.flavor == FL_PARAMETER)
intrinsic_array_parameter = true;
/* If use associated and whole file compilation, use the module
declaration. */
if (gfc_option.flag_whole_file
&& sym->attr.flavor == FL_VARIABLE
&& sym->attr.use_assoc
&& (sym->attr.flavor == FL_VARIABLE
|| sym->attr.flavor == FL_PARAMETER)
&& sym->attr.use_assoc && !intrinsic_array_parameter
&& sym->module)
{
gfc_gsymbol *gsym;
......@@ -1182,12 +1189,6 @@ gfc_get_symbol_decl (gfc_symbol * sym)
if (sym->attr.intrinsic)
internal_error ("intrinsic variable which isn't a procedure");
/* Special case for array-valued named constants from intrinsic
procedures; those are inlined. */
if (sym->attr.use_assoc && sym->from_intmod && sym->attr.dimension
&& sym->attr.flavor == FL_PARAMETER)
intrinsic_array_parameter = true;
/* Create string length decl first so that they can be used in the
type declaration. */
if (sym->ts.type == BT_CHARACTER)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment